diff participant.py @ 199:dcabe54deeba

improved an XMPP error handling, created Participant.say_on_XMPP_through_bridge() Signed-off-by: Charly COSTE <changaco@changaco.net>
author Charly COSTE <changaco@changaco.net>
date Thu, 25 Feb 2010 18:41:55 +0100
parents 4a379eb359dd
children 740effa74c18
line wrap: on
line diff
--- a/participant.py
+++ b/participant.py
@@ -313,10 +313,14 @@ class Participant:
 		if isinstance(self.xmpp_c, xmpp.client.Client):
 			self.muc.say(message)
 		elif not isinstance(self.irc_connection, ServerConnection):
-			if message[:4] == '/me ':
-				self.bridge.say(-1, '* '+self.nickname+' '+message[4:], on_irc=False)
-			else:
-				self.bridge.say(-1, '<'+self.nickname+'> '+message, on_irc=False)
+			self.say_on_XMPP_through_bridge(message)
+	
+	
+	def say_on_XMPP_through_bridge(message):
+		if message[:4] == '/me ':
+			self.bridge.say(-1, '* '+self.nickname+' '+message[4:], on_irc=False)
+		else:
+			self.bridge.say(-1, '<'+self.nickname+'> '+message, on_irc=False)
 	
 	
 	def sayOnXMPPTo(self, to, message):