diff participant.py @ 189:e04410e7e527

split the leaving process in two, first call to Bridge.removeParticipant() calls Participant.leave(), second call (when the bot receives the part or quit event) removes it from Bridge.participants Signed-off-by: Charly COSTE <changaco@changaco.net>
author Charly COSTE <changaco@changaco.net>
date Sat, 20 Feb 2010 23:08:39 +0100
parents 6173873c6b0d
children 12fa9bb73b1d
line wrap: on
line diff
--- a/participant.py
+++ b/participant.py
@@ -37,6 +37,7 @@ class Participant:
 		self.irc_connection = None
 		self.xmpp_c = None
 		self.muc = None
+		self.left = False
 		if protocol == 'xmpp' and self.bridge.mode in ['normal', 'bypass']:
 			self.createDuplicateOnIRC()
 		elif protocol == 'irc' and self.bridge.mode != 'minimal':
@@ -331,6 +332,7 @@ class Participant:
 	def leave(self, message):
 		if message == None:
 			message = ''
+		self.left = True
 		self._close_xmpp_connection(message)
 		self._close_irc_connection(message)