Mercurial > xib
comparison bridge.py @ 102:b3eba9489329
In minimal mode, display the participants' list on XMPP when someone joins on IRC
Signed-off-by: Charly COSTE <changaco@changaco.net>
author | Charly COSTE <changaco@changaco.net> |
---|---|
date | Fri, 20 Nov 2009 15:31:41 +0100 |
parents | 29d3b85c6286 |
children | 23416c27b592 |
comparison
equal
deleted
inserted
replaced
101:29d3b85c6286 | 102:b3eba9489329 |
---|---|
160 self.bot.error('===> Debug: unknown error while adding participant "'+nickname+'" from "'+from_protocol+'" to bridge "'+str(self)+'"', debug=True) | 160 self.bot.error('===> Debug: unknown error while adding participant "'+nickname+'" from "'+from_protocol+'" to bridge "'+str(self)+'"', debug=True) |
161 traceback.print_exc() | 161 traceback.print_exc() |
162 return | 162 return |
163 self.participants.append(p) | 163 self.participants.append(p) |
164 self.lock.release() | 164 self.lock.release() |
165 if self.mode != 'normal' and from_protocol == 'xmpp': | 165 if self.mode != 'normal': |
166 xmpp_participants_nicknames = self.get_participants_nicknames_list(protocols=['xmpp']) | 166 if from_protocol == 'xmpp': |
167 self.say('[Info] Participants on XMPP: '+' '.join(xmpp_participants_nicknames), on_xmpp=False) | 167 xmpp_participants_nicknames = self.get_participants_nicknames_list(protocols=['xmpp']) |
168 self.say('[Info] Participants on XMPP: '+' '.join(xmpp_participants_nicknames), on_xmpp=False) | |
169 elif self.mode == 'minimal' and from_protocol == 'irc': | |
170 irc_participants_nicknames = self.get_participants_nicknames_list(protocols=['irc']) | |
171 self.say('[Info] Participants on IRC: '+' '.join(irc_participants_nicknames), on_irc=False) | |
168 return p | 172 return p |
169 | 173 |
170 | 174 |
171 def getParticipant(self, nickname): | 175 def getParticipant(self, nickname): |
172 """Returns a participant object if there is a participant using nickname in the bridge. Raises a NoSuchParticipantException otherwise.""" | 176 """Returns a participant object if there is a participant using nickname in the bridge. Raises a NoSuchParticipantException otherwise.""" |