Add NickServ auth code

This commit is contained in:
Robert Miles 2020-12-01 18:03:48 +00:00
parent ccf3dcc855
commit f554a3bd27
2 changed files with 9 additions and 0 deletions

1
.gitignore vendored
View File

@ -99,3 +99,4 @@ channels.txt
state.*.json
*.secret
.password

8
bot.py
View File

@ -18,6 +18,13 @@ def newpost(it):
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):
def __init__(self,bot):
super(CosmicBot,self).__init__(bot)
@ -48,6 +55,7 @@ class CosmicBot(teambot.Handler):
def on_connection_established(self):
self.load_modules()
self.tasks.run()
self._bot.conn.privmsg("NickServ","IDENTIFY "+PASSWORD)
def check_rss(self,state,base_state):
try:
newtrans = rss.fetchNew(state["url"],[x["guid"] for x in state["known"]])