changeset 245:cf4f00441628

fix for Participant say_on_xmpp* functions, really check we are in the room before sending message Signed-off-by: Charly COSTE <changaco@changaco.net>
author Charly COSTE <changaco@changaco.net>
date Mon, 08 Mar 2010 18:30:13 +0100
parents 9b83cdd51523
children 5e65f52be453
files participant.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/participant.py
+++ b/participant.py
@@ -315,14 +315,14 @@ class Participant:
 	
 	
 	def say_on_xmpp(self, message, action=False):
-		if isinstance(self.xmpp_c, xmpp.client.Client):
+		if self.muc.connected:
 			self.muc.say(message, action=action)
 		elif not isinstance(self.irc_connection, ServerConnection):
 			self.bridge.say_on_behalf(self.nickname, message, 'xmpp', action=action)
 	
 	
 	def say_on_xmpp_to(self, to, message, action=False):
-		if isinstance(self.xmpp_c, xmpp.client.Client):
+		if self.muc.connected:
 			self.muc.say_to(to, message, action=action)
 		elif not isinstance(self.irc_connection, ServerConnection):
 			if self.bridge.mode not in ['normal', 'bypass']: