Mercurial > xib
comparison bridge.py @ 15:5aa4399c0530
Fixed a "copy/paste" bug
Signed-off-by: Charly COSTE <changaco@changaco.net>
author | Charly COSTE <changaco@changaco.net> |
---|---|
date | Mon, 17 Aug 2009 14:36:43 +0200 |
parents | fd695e2b5283 |
children | 32a35f7eff70 |
comparison
equal
deleted
inserted
replaced
14:1a1f2a0d35c7 | 15:5aa4399c0530 |
---|---|
57 def _irc_nick_callback(self, error): | 57 def _irc_nick_callback(self, error): |
58 if error == None: | 58 if error == None: |
59 self.irc_connection.join(self.irc_room) | 59 self.irc_connection.join(self.irc_room) |
60 self.irc_connection.nick_callback = None | 60 self.irc_connection.nick_callback = None |
61 self.bot.error('===> Debug: successfully connected on IRC side of bridge "'+str(self)+'"', debug=True) | 61 self.bot.error('===> Debug: successfully connected on IRC side of bridge "'+str(self)+'"', debug=True) |
62 elif self.protocol != 'both': | 62 if error == 'nicknameinuse': |
63 if error == 'nicknameinuse': | 63 self.bot.error('Error: "'+self.bot.nickname+'" is already used in the IRC chan of bridge "'+str(self)+'"') |
64 self.bot.error('Error: "'+self.bot.nickname+'" is already used in the IRC chan of bridge "'+str(self)+'"') | 64 raise Exception('Error: "'+self.bot.nickname+'" is already used in the IRC chan of bridge "'+str(self)+'"') |
65 raise Exception('Error: "'+self.bot.nickname+'" is already used in the IRC chan of bridge "'+str(self)+'"') | 65 elif error == 'erroneusnickname': |
66 elif error == 'erroneusnickname': | 66 self.bot.error('Error: "'+self.bot.nickname+'" got "erroneusnickname" on bridge "'+str(self)+'"') |
67 self.bot.error('Error: "'+self.bot.nickname+'" got "erroneusnickname" on bridge "'+str(self)+'"') | 67 raise Exception('Error: "'+self.bot.nickname+'" got "erroneusnickname" on bridge "'+str(self)+'"') |
68 raise Exception('Error: "'+self.bot.nickname+'" got "erroneusnickname" on bridge "'+str(self)+'"') | |
69 | 68 |
70 | 69 |
71 def addParticipant(self, protocol, nickname): | 70 def addParticipant(self, protocol, nickname): |
72 """Add a participant to the bridge.""" | 71 """Add a participant to the bridge.""" |
73 if (protocol == 'irc' and nickname == self.irc_connection.get_nickname()) or (protocol == 'xmpp' and nickname == self.xmpp_room.nickname): | 72 if (protocol == 'irc' and nickname == self.irc_connection.get_nickname()) or (protocol == 'xmpp' and nickname == self.xmpp_room.nickname): |