comparison participant.py @ 260:9a2302e8382b

(irclib) created a "Channel" class Signed-off-by: Charly COSTE <changaco@changaco.net>
author Charly COSTE <changaco@changaco.net>
date Sat, 13 Mar 2010 17:38:47 +0100
parents 3b318108e9e0
children d04e40b7be2e
comparison
equal deleted inserted replaced
259:3b318108e9e0 260:9a2302e8382b
352 self.bridge.bot.close_xmpp_connection(self.nickname) 352 self.bridge.bot.close_xmpp_connection(self.nickname)
353 353
354 354
355 def _close_irc_connection(self, message): 355 def _close_irc_connection(self, message):
356 if isinstance(self.irc_connection, ServerConnection): 356 if isinstance(self.irc_connection, ServerConnection):
357 if self.irc_connection.logged_in: 357 self.irc_connection.part(self.bridge.irc_room, message=message)
358 self.irc_connection.part(self.bridge.irc_room, message=message)
359 self.irc_connection.used_by -= 1 358 self.irc_connection.used_by -= 1
360 if self.irc_connection.used_by < 1: 359 if self.irc_connection.used_by < 1:
361 self.irc_connection.close(message) 360 self.irc_connection.close(message)
362 self.irc_connection = None 361 self.irc_connection = None
363 362