# HG changeset patch # User Charly COSTE # Date 1251655746 -7200 # Node ID 7aa1f59800b05fa522be1ffe45793d1ef19e8171 # Parent 2e3561313b0f8bb07a92d288b0397fe7e416e256 Fixed IRC nick callback Signed-off-by: Charly COSTE diff --git a/irclib.py b/irclib.py --- a/irclib.py +++ b/irclib.py @@ -437,7 +437,10 @@ class ServerConnection(Connection): if self.connected == True: self.used_by += 1 self.irclibobj.bot.error('===> Debug: using existing IRC connection for '+self.__str__()+', this connection is now used by '+str(self.used_by)+' bridges', debug=True) - self.nick(self.real_nickname, callback=nick_callback) + if nick_callback != None: + self.add_nick_callback(nick_callback) + if self.really_connected == True: + self._call_nick_callbacks(None) self.lock.release() return self diff --git a/participant.py b/participant.py --- a/participant.py +++ b/participant.py @@ -69,8 +69,6 @@ class participant: sleep(1) # try to prevent "reconnecting too fast" shit self.irc_connection = self.bridge.bot.irc.server(self.bridge.irc_server, self.bridge.irc_port, self.nickname) self.irc_connection.connect(nick_callback=self._irc_nick_callback) - if self.irc_connection != None: - self.irc_connection.join(self.bridge.irc_room) def _irc_nick_callback(self, error, arguments=[]):