Mercurial > xib
comparison bot.py @ 137:9f39cead20cb
reduced duplication of error messages
Signed-off-by: Charly COSTE <changaco@changaco.net>
author | Charly COSTE <changaco@changaco.net> |
---|---|
date | Sat, 16 Jan 2010 17:01:17 +0100 |
parents | 931a5edc7971 |
children | 46c02cc89f18 |
comparison
equal
deleted
inserted
replaced
136:7dc6a1764c4f | 137:9f39cead20cb |
---|---|
613 try: | 613 try: |
614 banned = bridge.getParticipant(event.target()) | 614 banned = bridge.getParticipant(event.target()) |
615 if banned.irc_connection != 'bannedfromchan': | 615 if banned.irc_connection != 'bannedfromchan': |
616 banned.irc_connection = 'bannedfromchan' | 616 banned.irc_connection = 'bannedfromchan' |
617 self.error(event_str, debug=True) | 617 self.error(event_str, debug=True) |
618 self.error('[Notice] the nickname "'+event.target()+'" is banned from the IRC chan of bridge "'+str(bridge)+'"') | 618 bridge.say('[Warning] the nickname "'+event.target()+'" is banned from the IRC chan', log=True) |
619 bridge.say('[Warning] the nickname "'+event.target()+'" is banned from the IRC chan') | |
620 else: | 619 else: |
621 self.error('=> Debug: ignoring '+event.eventtype(), debug=True) | 620 self.error('=> Debug: ignoring '+event.eventtype(), debug=True) |
622 except Bridge.NoSuchParticipantException: | 621 except Bridge.NoSuchParticipantException: |
623 self.error('=> Debug: no such participant. WTF ?') | 622 self.error('=> Debug: no such participant. WTF ?') |
624 return | 623 return |