Mercurial > xib
comparison bot.py @ 258:3b4826e14642
fixed an UnboundLocalError in IRC kick handling, bug introduced in f1a21a006f2facd0ec2a71e99180b7b4df0907e3
Signed-off-by: Charly COSTE <changaco@changaco.net>
author | Charly COSTE <changaco@changaco.net> |
---|---|
date | Sat, 13 Mar 2010 23:37:53 +0100 |
parents | 38dd27098fef |
children | 26f7df23aee0 |
comparison
equal
deleted
inserted
replaced
257:1a8401d6bc93 | 258:3b4826e14642 |
---|---|
621 kicked = bridge.get_participant(event.arguments()[0]) | 621 kicked = bridge.get_participant(event.arguments()[0]) |
622 except Bridge.NoSuchParticipantException: | 622 except Bridge.NoSuchParticipantException: |
623 self.error(say_levels.debug, 'a participant that was not here has been kicked ? WTF ?'+event_str) | 623 self.error(say_levels.debug, 'a participant that was not here has been kicked ? WTF ?'+event_str) |
624 return | 624 return |
625 | 625 |
626 leave_message = 'kicked by '+nickname | 626 leave_message = 'kicked by '+source_nickname |
627 if len(event.arguments()) > 1: | 627 if len(event.arguments()) > 1: |
628 leave_message += ' with reason: '+event.arguments()[1] | 628 leave_message += ' with reason: '+event.arguments()[1] |
629 else: | 629 else: |
630 leave_message += ' (no reason was given)' | 630 leave_message += ' (no reason was given)' |
631 log_message = '"'+kicked.nickname+'" has been '+leave_message | 631 log_message = '"'+kicked.nickname+'" has been '+leave_message |