comparison bot.py @ 213:fbe40b397f67

created Bridge.say_on_behalf in order to avoid code repetition in participant.py Signed-off-by: Charly COSTE <changaco@changaco.net>
author Charly COSTE <changaco@changaco.net>
date Sat, 06 Mar 2010 19:05:07 +0100
parents aa03c7ca53cb
children d527d7b75f56
comparison
equal deleted inserted replaced
212:aa03c7ca53cb 213:fbe40b397f67
597 if event.eventtype() in ['pubmsg', 'action']: 597 if event.eventtype() in ['pubmsg', 'action']:
598 if bridge.irc_room == event.target().lower() and bridge.irc_server == connection.server: 598 if bridge.irc_room == event.target().lower() and bridge.irc_server == connection.server:
599 self.error(2, debug_str, debug=True) 599 self.error(2, debug_str, debug=True)
600 message = event.arguments()[0] 600 message = event.arguments()[0]
601 if event.eventtype() == 'action': 601 if event.eventtype() == 'action':
602 message = '/me '+message 602 action = True
603 from_.say_on_xmpp(message) 603 else:
604 action = False
605 from_.say_on_xmpp(message, action=action)
604 return 606 return
605 else: 607 else:
606 continue 608 continue
607 609
608 if handled: 610 if handled: