# HG changeset patch # User Charly COSTE # Date 1263417770 -3600 # Node ID 9e90e15913a70364b8851c478bab3f346751ac53 # Parent 765e460bc20a795e1d9c8ab53c6e4e362154707c bug fixes Signed-off-by: Charly COSTE diff --git a/bot.py b/bot.py --- a/bot.py +++ b/bot.py @@ -781,7 +781,8 @@ class bot(Thread): participants.append(p) p.xmpp_c = None self.error('===> Debug: reopening XMPP connection for "'+nickname+'"', debug=True) - self.xmpp_connections.pop(nickname) + if self.xmpp_connections.has_key(nickname): + self.xmpp_connections.pop(nickname) c.send(xmpp.protocol.Presence(typ='unavailable')) del c c = self.get_xmpp_connection(nickname) @@ -793,6 +794,7 @@ class bot(Thread): c.mucs = mucs for m in c.mucs: m.rejoin() + return c def close_xmpp_connection(self, nickname): diff --git a/bridge.py b/bridge.py --- a/bridge.py +++ b/bridge.py @@ -294,7 +294,7 @@ class bridge: try: p.irc_connection.join(self.irc_room) except: - p._close_irc_connection() + p._close_irc_connection(leave_message) p.createDuplicateOnIRC() return