diff --git a/README b/README new file mode 100644 index 0000000..fc7c018 --- /dev/null +++ b/README @@ -0,0 +1,5 @@ +Not that ugly IRC bot. In fact, ircbot.py is quite nice. + +Contributions +------------- +* FireFly: Join back to auto-join channels on /invite diff --git a/ircbot.py b/ircbot.py index cd127ff..d4513ed 100755 --- a/ircbot.py +++ b/ircbot.py @@ -43,8 +43,14 @@ class Connhandler(threading.Thread): if s.split(' ')[0]!='PONG': self.logc.send(s+'\n') def check(self,line): - if line.split(' ')[0]=='PING': + args=line.split(' ') + nick=args[0].split('!')[0][1:] + chan=args[2] if len(args) >= 3 and args[2][0]=='#' else nick + if args[0]=='PING': self.send('PONG :hjdicks') + elif args[1]=='INVITE' and args[2]==self.nick and args[3][1:] in self.chan.split(' '): + botcmd.addauthcmd(nick, 'JOIN '+args[3]) + self.send('PRIVMSG NickServ :ACC '+nick) else: self.logc.send(line+'\n') Threadwrapper(botcmd.parse,(line,self.inpc)).start()