diff --git a/.gitignore b/.gitignore index 5a62c92..6272c40 100644 --- a/.gitignore +++ b/.gitignore @@ -99,3 +99,4 @@ channels.txt state.*.json *.secret +.password diff --git a/bot.py b/bot.py index 8c6a40f..e67499a 100644 --- a/bot.py +++ b/bot.py @@ -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"]])