diff muc.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 2a81c480439a
children 0c99d38b84b8
line wrap: on
line diff
--- a/muc.py
+++ b/muc.py
@@ -109,9 +109,11 @@ class muc:
 				self.callback(errors)
 	
 	
-	def say(self, message):
+	def say(self, message, action=False):
 		"""Say message in the room"""
 		self.xmpp_c.lock.acquire()
+		if action:
+			message = '/me '+message
 		s = xmpp.protocol.Message(to=self.room_jid, typ='groupchat', body=message)
 		self._send(s)
 		self.xmpp_c.lock.release()