changeset 190:6db99e458168

fixed calls to Bot.restart_bridges_delayed(), arguments changed in f52cb2f6e273328e73d75ab4ecf214c8dc9dfe1b Signed-off-by: Charly COSTE <changaco@changaco.net>
author Charly COSTE <changaco@changaco.net>
date Sun, 21 Feb 2010 11:53:47 +0100
parents e04410e7e527
children ac89a4a72a62
files bot.py bridge.py
diffstat 2 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/bot.py
+++ b/bot.py
@@ -157,7 +157,7 @@ class Bot(threading.Thread):
 									# MUC server is going down, try to restart the bridges in 1 minute
 									bridges = self.findBridges([from_.getDomain()])
 									m = 'The MUC server '+from_.getDomain()+' seems to be going down, the bot will try to recreate all bridges related to this server in 1 minute'
-									error = (say_levels.warning, m)
+									error = [say_levels.warning, m]
 									self.restart_bridges_delayed(bridges, 60, error)
 									return
 								elif r == '':
@@ -264,8 +264,8 @@ class Bot(threading.Thread):
 										# Remote server not found
 										# Stop bridges that depend on this server
 										bridges = self.findBridges([from_.getDomain()])
-										error_message = '[Error] XMPP Remote server not found: '+from_.getDomain()
-										self.restart_bridges_delayed(bridges, 60, error_message)
+										error = [say_levels.error, 'XMPP Remote server not found: '+from_.getDomain()]
+										self.restart_bridges_delayed(bridges, 60, error)
 									else:
 										raise Exception(presence.__str__(fancy=1).encode('utf-8'))
 					
--- a/bridge.py
+++ b/bridge.py
@@ -105,8 +105,8 @@ class Bridge:
 	def _RemoteServerNotFound_handler(self):
 		server = xmpp.protocol.JID(self.xmpp_room_jid).getDomain()
 		bridges = self.bot.findBridges([server])
-		error_message = '[Warning] The MUC server '+server+' seems to be down, the bot will try to recreate all bridges related to this server in 5 minutes'
-		self.bot.restart_bridges_delayed(bridges, 300, error_message)
+		error = [say_levels.warning, 'The MUC server '+server+' seems to be down, the bot will try to recreate all bridges related to this server in 5 minutes']
+		self.bot.restart_bridges_delayed(bridges, 300, error)
 	
 	
 	def _xmpp_join_callback(self, errors):