Mercurial > xib
comparison participant.py @ 174:c158ad24ef3c
moved irc connection interval handling to irclib
Signed-off-by: Charly COSTE <changaco@changaco.net>
author | Charly COSTE <changaco@changaco.net> |
---|---|
date | Thu, 04 Feb 2010 21:02:36 +0100 |
parents | 64a0e9636ae6 |
children | 102f895347ff |
comparison
equal
deleted
inserted
replaced
173:6c4aaf8f3733 | 174:c158ad24ef3c |
---|---|
105 | 105 |
106 | 106 |
107 def createDuplicateOnIRC(self): | 107 def createDuplicateOnIRC(self): |
108 if isinstance(self.xmpp_c, xmpp.client.Client) or isinstance(self.irc_connection, ServerConnection): | 108 if isinstance(self.xmpp_c, xmpp.client.Client) or isinstance(self.irc_connection, ServerConnection): |
109 return | 109 return |
110 sleep(self.bridge.irc_connection_interval) # to prevent "reconnecting too fast" | |
111 self.irc_connection = self.bridge.bot.irc.open_connection(self.bridge.irc_server, self.bridge.irc_port, self.duplicate_nickname) | 110 self.irc_connection = self.bridge.bot.irc.open_connection(self.bridge.irc_server, self.bridge.irc_port, self.duplicate_nickname) |
112 self.irc_connection.connect(nick_callback=self._irc_nick_callback) | 111 self.irc_connection.connect(nick_callback=self._irc_nick_callback) |
113 | 112 |
114 | 113 |
115 def _irc_nick_callback(self, error, arguments=[]): | 114 def _irc_nick_callback(self, error, arguments=[]): |