Rejoin on invite, by FireFly
This commit is contained in:
parent
386b351ba9
commit
a8353b6283
2 changed files with 12 additions and 1 deletions
5
README
Normal file
5
README
Normal file
|
@ -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
|
|
@ -43,8 +43,14 @@ class Connhandler(threading.Thread):
|
||||||
if s.split(' ')[0]!='PONG':
|
if s.split(' ')[0]!='PONG':
|
||||||
self.logc.send(s+'\n')
|
self.logc.send(s+'\n')
|
||||||
def check(self,line):
|
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')
|
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:
|
else:
|
||||||
self.logc.send(line+'\n')
|
self.logc.send(line+'\n')
|
||||||
Threadwrapper(botcmd.parse,(line,self.inpc)).start()
|
Threadwrapper(botcmd.parse,(line,self.inpc)).start()
|
||||||
|
|
Loading…
Reference in a new issue