comparison bridge.py @ 131:46af7f2744a9

added irclib.ServerConnection.left_channels Signed-off-by: Charly COSTE <changaco@changaco.net>
author Charly COSTE <changaco@changaco.net>
date Fri, 15 Jan 2010 16:30:50 +0100
parents efdc038e757a
children 6a6885dbed25
comparison
equal deleted inserted replaced
130:52d94261a406 131:46af7f2744a9
281 p.createDuplicateOnIRC() 281 p.createDuplicateOnIRC()
282 else: 282 else:
283 if left_protocol == 'xmpp': 283 if left_protocol == 'xmpp':
284 was_on_both = False 284 was_on_both = False
285 elif left_protocol == 'irc': 285 elif left_protocol == 'irc':
286 try: 286 if isinstance(p.irc_connection, ServerConnection):
287 p.irc_connection.join(self.irc_room) 287 p.irc_connection.join(self.irc_room)
288 except: 288 else:
289 p._close_irc_connection(leave_message) 289 c = self.bot.irc.get_connection(self.irc_server, self.irc_port, p.duplicate_nickname)
290 p.createDuplicateOnIRC() 290 if not (c and self.irc_room in c.left_channels):
291 p._close_irc_connection(leave_message)
292 p.createDuplicateOnIRC()
291 return 293 return
292 294
293 elif p.protocol == 'irc': 295 elif p.protocol == 'irc':
294 if p.xmpp_c == 'both': 296 if p.xmpp_c == 'both':
295 was_on_both = True 297 was_on_both = True