Mercurial > xib
comparison bot.py @ 255:38dd27098fef
minor fix in _irc_event_handler, check source_nickname before giving it to Bridge.get_participant
Signed-off-by: Charly COSTE <changaco@changaco.net>
author | Charly COSTE <changaco@changaco.net> |
---|---|
date | Wed, 10 Mar 2010 13:13:13 +0100 |
parents | 5d6ff929e6bc |
children | 3b4826e14642 |
comparison
equal
deleted
inserted
replaced
254:3b930e2fad43 | 255:38dd27098fef |
---|---|
599 | 599 |
600 chan = event.target().lower() | 600 chan = event.target().lower() |
601 | 601 |
602 bridge = self.get_bridge(irc_room=chan, irc_server=connection.server) | 602 bridge = self.get_bridge(irc_room=chan, irc_server=connection.server) |
603 | 603 |
604 try: | 604 from_ = None |
605 from_ = bridge.get_participant(source_nickname) | 605 if source_nickname: |
606 except Bridge.NoSuchParticipantException: | 606 try: |
607 from_ = None | 607 from_ = bridge.get_participant(source_nickname) |
608 except Bridge.NoSuchParticipantException: | |
609 pass | |
608 | 610 |
609 | 611 |
610 # Join event | 612 # Join event |
611 if event.eventtype() == 'join': | 613 if event.eventtype() == 'join': |
612 bridge.add_participant('irc', source_nickname) | 614 bridge.add_participant('irc', source_nickname) |