comparison participant.py @ 231:5f1e9211af03

fix for 48ad162772b79740e8ff580bde2c250b9957c126, we do need arguments in nick callbacks Signed-off-by: Charly COSTE <changaco@changaco.net>
author Charly COSTE <changaco@changaco.net>
date Sun, 07 Mar 2010 23:03:18 +0100
parents a434b73bde51
children cf4f00441628
comparison
equal deleted inserted replaced
230:d5a126cf119c 231:5f1e9211af03
112 return 112 return
113 self.irc_connection = self.bridge.bot.irc.open_connection(self.bridge.irc_server, self.bridge.irc_port, self.duplicate_nickname) 113 self.irc_connection = self.bridge.bot.irc.open_connection(self.bridge.irc_server, self.bridge.irc_port, self.duplicate_nickname)
114 self.irc_connection.connect(nick_callback=self._irc_nick_callback) 114 self.irc_connection.connect(nick_callback=self._irc_nick_callback)
115 115
116 116
117 def _irc_nick_callback(self, error): 117 def _irc_nick_callback(self, error, arguments=None):
118 if not error: 118 if not error:
119 self.irc_connection.join(self.bridge.irc_room, callback=self._irc_join_callback) 119 self.irc_connection.join(self.bridge.irc_room, callback=self._irc_join_callback)
120 120
121 elif self.irc_connection != 'both': 121 elif self.irc_connection != 'both':
122 122
124 if arguments[0].arguments()[0] != self.duplicate_nickname: 124 if arguments[0].arguments()[0] != self.duplicate_nickname:
125 return 125 return
126 126
127 if self.bridge.mode == 'bypass': 127 if self.bridge.mode == 'bypass':
128 new_duplicate_nickname = self._get_new_duplicate_nickname() 128 new_duplicate_nickname = self._get_new_duplicate_nickname()
129 if new_duplicate_nickname != None: 129 if new_duplicate_nickname:
130 self.bridge.bot.error(3, '"'+self.duplicate_nickname+'" is already used or reserved on the IRC server of bridge "'+str(self.bridge)+'", trying "'+new_duplicate_nickname+'"', debug=True) 130 self.bridge.bot.error(3, '"'+self.duplicate_nickname+'" is already used or reserved on the IRC server of bridge "'+str(self.bridge)+'", trying "'+new_duplicate_nickname+'"', debug=True)
131 if self.duplicate_nickname == self.nickname: 131 if self.duplicate_nickname == self.nickname:
132 self.bridge.say(say_levels.info, 'The nickname "'+self.duplicate_nickname+'" is used or reserved on the IRC server') 132 self.bridge.say(say_levels.info, 'The nickname "'+self.duplicate_nickname+'" is used or reserved on the IRC server')
133 self.duplicate_nickname = new_duplicate_nickname 133 self.duplicate_nickname = new_duplicate_nickname
134 if isinstance(self.irc_connection, ServerConnection): 134 if isinstance(self.irc_connection, ServerConnection):