Mercurial > xib
comparison bridge.py @ 175:8378da7844f2
minor fix in Bridge.addParticipant(), don't rely on Bridge.irc_connection or Bridge.xmpp_room when not necessary
Signed-off-by: Charly COSTE <changaco@changaco.net>
author | Charly COSTE <changaco@changaco.net> |
---|---|
date | Mon, 08 Feb 2010 19:01:04 +0100 |
parents | c158ad24ef3c |
children | bca516d04bdb |
comparison
equal
deleted
inserted
replaced
174:c158ad24ef3c | 175:8378da7844f2 |
---|---|
138 self.stop(message='failed to connect to the XMPP room') | 138 self.stop(message='failed to connect to the XMPP room') |
139 | 139 |
140 | 140 |
141 def addParticipant(self, from_protocol, nickname, real_jid=None, irc_id=None): | 141 def addParticipant(self, from_protocol, nickname, real_jid=None, irc_id=None): |
142 """Add a participant to the bridge.""" | 142 """Add a participant to the bridge.""" |
143 if (from_protocol == 'irc' and nickname == self.irc_connection.get_nickname()) or (from_protocol == 'xmpp' and nickname == self.xmpp_room.nickname): | 143 if (from_protocol == 'irc' and nickname == self.bot.nickname) or (from_protocol == 'xmpp' and nickname == self.bot.nickname): |
144 self.bot.error('===> Debug: not adding self ('+self.bot.nickname+') to bridge "'+str(self)+'"', debug=True) | 144 self.bot.error('===> Debug: not adding self ('+self.bot.nickname+') to bridge "'+str(self)+'"', debug=True) |
145 return | 145 return |
146 try: | 146 try: |
147 p = self.getParticipant(nickname) | 147 p = self.getParticipant(nickname) |
148 if p.protocol != from_protocol: | 148 if p.protocol != from_protocol: |