Mercurial > xib
comparison bridge.py @ 233:4ad8e985c7d3
tried to fix Bridge.remove_participant
Signed-off-by: Charly COSTE <changaco@changaco.net>
author | Charly COSTE <changaco@changaco.net> |
---|---|
date | Sun, 07 Mar 2010 23:50:56 +0100 |
parents | 5f1e9211af03 |
children | 71c23e30cd6c |
comparison
equal
deleted
inserted
replaced
232:02c58515edde | 233:4ad8e985c7d3 |
---|---|
293 if left_protocol == 'xmpp': | 293 if left_protocol == 'xmpp': |
294 was_on_both = False | 294 was_on_both = False |
295 elif left_protocol == 'irc': | 295 elif left_protocol == 'irc': |
296 # got disconnected somehow | 296 # got disconnected somehow |
297 if isinstance(p.irc_connection, ServerConnection): | 297 if isinstance(p.irc_connection, ServerConnection): |
298 if p.irc_connection.socket == 'closed': | |
299 return | |
298 p.irc_connection.join(self.irc_room) | 300 p.irc_connection.join(self.irc_room) |
299 else: | 301 else: |
300 c = self.bot.irc.get_connection(self.irc_server, self.irc_port, p.duplicate_nickname) | 302 c = self.bot.irc.get_connection(self.irc_server, self.irc_port, p.duplicate_nickname) |
301 if not (c and self.irc_room in c.left_channels): | 303 if not (c and self.irc_room in c.left_channels): |
302 p._close_irc_connection(leave_message) | 304 p._close_irc_connection(leave_message) |
313 p.create_duplicate_on_xmpp() | 315 p.create_duplicate_on_xmpp() |
314 else: | 316 else: |
315 if left_protocol == 'irc': | 317 if left_protocol == 'irc': |
316 was_on_both = False | 318 was_on_both = False |
317 elif left_protocol == 'xmpp': | 319 elif left_protocol == 'xmpp': |
320 if isinstance(p.muc, xmpp.muc) and not xmpp.muc.connected: | |
321 return | |
318 # got disconnected somehow | 322 # got disconnected somehow |
319 if isinstance(p.xmpp_c, xmpp.client.Client): | 323 if isinstance(p.xmpp_c, xmpp.client.Client): |
320 self.bot.reopen_xmpp_connection(p.xmpp_c) | 324 self.bot.reopen_xmpp_connection(p.xmpp_c) |
321 return | 325 return |
322 | 326 |