diff --git a/README b/README index fc7c018..a17f129 100644 --- a/README +++ b/README @@ -2,4 +2,4 @@ Not that ugly IRC bot. In fact, ircbot.py is quite nice. Contributions ------------- -* FireFly: Join back to auto-join channels on /invite +* FireFly: Join back to auto-join channels on /invite (original) diff --git a/botcmd.py b/botcmd.py index f902926..41308e6 100644 --- a/botcmd.py +++ b/botcmd.py @@ -236,6 +236,9 @@ def parse((line,irc)): irc.msg(line[3][1:], 'WTF, NickServ returned %s'+line[5]) authcmdlock.release() authfunclock.release() + elif line[1]=='INVITE' and line[2]==irc.nick and line[3][1:] in irc.chan.split(' '): + addauthcmd(nick, 'JOIN '+line[3]) + irc.msg('NickServ', 'ACC '+nick) elif line[1]=='482': irc.msg(line[3], 'Not op') #elif line[1]=='332' or line[1]=='TOPIC': diff --git a/ircbot.py b/ircbot.py index 149963b..358fbdc 100755 --- a/ircbot.py +++ b/ircbot.py @@ -59,13 +59,8 @@ class Connhandler(threading.Thread): self.logc.send(s+'\n') def check(self,line): 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,Irc(self.chan, self.nick, self.inpc))).start()