diff bridge.py @ 22:e2bd4de698e5

Solved an XMPP resource conflict that would have happened when someone on IRC changed its nickname and later its old nickname would be used again. In other words, the bot no longer uses nicknames as XMPP resources. Signed-off-by: Charly COSTE <changaco@changaco.net>
author Charly COSTE <changaco@changaco.net>
date Thu, 20 Aug 2009 17:49:40 +0200
parents 801160b4136f
children 4e1f27ea527b
line wrap: on
line diff
--- a/bridge.py
+++ b/bridge.py
@@ -119,6 +119,9 @@ class bridge:
 		self.bot.error('===> Debug: adding participant "'+nickname+'" from "'+protocol+'" to bridge "'+str(self)+'"', debug=True)
 		try:
 			p = participant(self, protocol, nickname)
+		except IOError:
+			self.bot.error('===> Debug: IOError while adding participant "'+nickname+'" from "'+protocol+'" to bridge "'+str(self)+'", reconnectiong ...', debug=True)
+			p.xmpp_c.reconnectAndReauth()
 		except:
 			self.bot.error('===> Debug: unknown error while adding participant "'+nickname+'" from "'+protocol+'" to bridge "'+str(self)+'"', debug=True)
 			traceback.print_exc()