Mercurial > xib
diff bot.py @ 48:cb08ea878db9
lower() for "join" and "namreply" IRC events
Signed-off-by: Charly COSTE <changaco@changaco.net>
author | Charly COSTE <changaco@changaco.net> |
---|---|
date | Mon, 24 Aug 2009 23:32:34 +0200 |
parents | dd9d93ae405a |
children | 714e78fb912e |
line wrap: on
line diff
--- a/bot.py +++ b/bot.py @@ -361,16 +361,16 @@ class bot(Thread): if event.eventtype() == 'namreply': # TODO: lock self.bridges for thread safety - for bridge in self.getBridges(irc_room=event.arguments()[1], irc_server=connection.server): + for bridge in self.getBridges(irc_room=event.arguments()[1].lower(), irc_server=connection.server): for nickname in re.split('(?:^[&@\+]?|(?: [&@\+]?)*)', event.arguments()[2].strip()): if nickname == '' or nickname == self.nickname: continue bridge.addParticipant('irc', nickname) return elif event.eventtype() == 'join': - bridges = self.getBridges(irc_room=event.target(), irc_server=connection.server) + bridges = self.getBridges(irc_room=event.target().lower(), irc_server=connection.server) if len(bridges) == 0: - self.error('===> Debug: no bridge found for "'+event.target()+' at '+connection.server+'"', debug=True) + self.error('===> Debug: no bridge found for "'+event.target().lower()+' at '+connection.server+'"', debug=True) return for bridge in bridges: bridge.addParticipant('irc', nickname)