diff 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
line wrap: on
line diff
--- a/bot.py
+++ b/bot.py
@@ -599,8 +599,10 @@ class Bot(threading.Thread):
 						self.error(2, debug_str, debug=True)
 						message = event.arguments()[0]
 						if event.eventtype() == 'action':
-							message = '/me '+message
-						from_.say_on_xmpp(message)
+							action = True
+						else:
+							action = False
+						from_.say_on_xmpp(message, action=action)
 						return
 					else:
 						continue