# HG changeset patch # User Charly COSTE # Date 1252175644 -7200 # Node ID 5115ba7d598309f24fded9c0680315685a87cae9 # Parent 90baff5dedb24df6ae1454a4b128eb2781f979b6 Leave chan only if (really) connected Signed-off-by: Charly COSTE diff --git a/participant.py b/participant.py --- a/participant.py +++ b/participant.py @@ -216,7 +216,8 @@ class participant: self.muc.leave(auto_decode(message)) self.bridge.bot.close_xmpp_connection(self.nickname) if isinstance(self.irc_connection, ServerConnection): - self.irc_connection.part(self.bridge.irc_room, message=message) + if self.irc_connection.really_connected == True: + self.irc_connection.part(self.bridge.irc_room, message=message) self.irc_connection.used_by -= 1 if self.irc_connection.used_by < 1: self.irc_connection.close(message)