Mercurial > xib
comparison participant.py @ 83:5115ba7d5983
Leave chan only if (really) connected
Signed-off-by: Charly COSTE <changaco@changaco.net>
author | Charly COSTE <changaco@changaco.net> |
---|---|
date | Sat, 05 Sep 2009 20:34:04 +0200 |
parents | 90baff5dedb2 |
children | bfa32b017fc9 |
comparison
equal
deleted
inserted
replaced
82:90baff5dedb2 | 83:5115ba7d5983 |
---|---|
214 message = '' | 214 message = '' |
215 if isinstance(self.xmpp_c, xmpp.client.Client): | 215 if isinstance(self.xmpp_c, xmpp.client.Client): |
216 self.muc.leave(auto_decode(message)) | 216 self.muc.leave(auto_decode(message)) |
217 self.bridge.bot.close_xmpp_connection(self.nickname) | 217 self.bridge.bot.close_xmpp_connection(self.nickname) |
218 if isinstance(self.irc_connection, ServerConnection): | 218 if isinstance(self.irc_connection, ServerConnection): |
219 self.irc_connection.part(self.bridge.irc_room, message=message) | 219 if self.irc_connection.really_connected == True: |
220 self.irc_connection.part(self.bridge.irc_room, message=message) | |
220 self.irc_connection.used_by -= 1 | 221 self.irc_connection.used_by -= 1 |
221 if self.irc_connection.used_by < 1: | 222 if self.irc_connection.used_by < 1: |
222 self.irc_connection.close(message) | 223 self.irc_connection.close(message) |
223 self.irc_connection = None | 224 self.irc_connection = None |
224 self.nickname = None | 225 self.nickname = None |