Mercurial > xib
comparison participant.py @ 68:7aa1f59800b0
Fixed IRC nick callback
Signed-off-by: Charly COSTE <changaco@changaco.net>
author | Charly COSTE <changaco@changaco.net> |
---|---|
date | Sun, 30 Aug 2009 20:09:06 +0200 |
parents | 91b98275f2eb |
children | 6c4b841144f6 |
comparison
equal
deleted
inserted
replaced
67:2e3561313b0f | 68:7aa1f59800b0 |
---|---|
67 if self.irc_connection != None or self.xmpp_c != None or self.bridge.mode != 'normal': | 67 if self.irc_connection != None or self.xmpp_c != None or self.bridge.mode != 'normal': |
68 return | 68 return |
69 sleep(1) # try to prevent "reconnecting too fast" shit | 69 sleep(1) # try to prevent "reconnecting too fast" shit |
70 self.irc_connection = self.bridge.bot.irc.server(self.bridge.irc_server, self.bridge.irc_port, self.nickname) | 70 self.irc_connection = self.bridge.bot.irc.server(self.bridge.irc_server, self.bridge.irc_port, self.nickname) |
71 self.irc_connection.connect(nick_callback=self._irc_nick_callback) | 71 self.irc_connection.connect(nick_callback=self._irc_nick_callback) |
72 if self.irc_connection != None: | |
73 self.irc_connection.join(self.bridge.irc_room) | |
74 | 72 |
75 | 73 |
76 def _irc_nick_callback(self, error, arguments=[]): | 74 def _irc_nick_callback(self, error, arguments=[]): |
77 if error == None: | 75 if error == None: |
78 self.irc_connection.join(self.bridge.irc_room) | 76 self.irc_connection.join(self.bridge.irc_room) |