Add NickServ auth code
This commit is contained in:
parent
ccf3dcc855
commit
f554a3bd27
|
@ -99,3 +99,4 @@ channels.txt
|
||||||
|
|
||||||
state.*.json
|
state.*.json
|
||||||
*.secret
|
*.secret
|
||||||
|
.password
|
||||||
|
|
8
bot.py
8
bot.py
|
@ -18,6 +18,13 @@ def newpost(it):
|
||||||
date = datetimejoin('-', it.published_parsed[0:3]) + ' ' + datetimejoin(':', it.published_parsed[3:6])
|
date = datetimejoin('-', it.published_parsed[0:3]) + ' ' + datetimejoin(':', it.published_parsed[3:6])
|
||||||
)
|
)
|
||||||
|
|
||||||
|
PASSWORD="nada"
|
||||||
|
try:
|
||||||
|
with open(".password") as f:
|
||||||
|
PASSWORD=f.read().strip()
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
|
||||||
class CosmicBot(teambot.Handler):
|
class CosmicBot(teambot.Handler):
|
||||||
def __init__(self,bot):
|
def __init__(self,bot):
|
||||||
super(CosmicBot,self).__init__(bot)
|
super(CosmicBot,self).__init__(bot)
|
||||||
|
@ -48,6 +55,7 @@ class CosmicBot(teambot.Handler):
|
||||||
def on_connection_established(self):
|
def on_connection_established(self):
|
||||||
self.load_modules()
|
self.load_modules()
|
||||||
self.tasks.run()
|
self.tasks.run()
|
||||||
|
self._bot.conn.privmsg("NickServ","IDENTIFY "+PASSWORD)
|
||||||
def check_rss(self,state,base_state):
|
def check_rss(self,state,base_state):
|
||||||
try:
|
try:
|
||||||
newtrans = rss.fetchNew(state["url"],[x["guid"] for x in state["known"]])
|
newtrans = rss.fetchNew(state["url"],[x["guid"] for x in state["known"]])
|
||||||
|
|
Loading…
Reference in New Issue