diff muc.py @ 229:a434b73bde51

added optional "action" argument to Participant.say_on_xmpp_to and muc.say_to Signed-off-by: Charly COSTE <changaco@changaco.net>
author Charly COSTE <changaco@changaco.net>
date Sun, 07 Mar 2010 22:12:25 +0100
parents 45065f6f674c
children 9b83cdd51523
line wrap: on
line diff
--- a/muc.py
+++ b/muc.py
@@ -130,9 +130,11 @@ class muc:
 		self.xmpp_c.lock.release()
 	
 	
-	def say_to(self, to, message):
+	def say_to(self, to, message, action=False):
 		"""Send a private message"""
 		self.xmpp_c.lock.acquire()
+		if action:
+			message = '/me '+message
 		s = xmpp.protocol.Message(to=self.room_jid+'/'+to, typ='chat', body=message)
 		self._send(s)
 		self.xmpp_c.lock.release()