diff participant.py @ 150:e0eea72ea493

new bridge attribute "irc_connection_interval" (in seconds) Signed-off-by: Charly COSTE <changaco@changaco.net>
author Charly COSTE <changaco@changaco.net>
date Sun, 17 Jan 2010 21:14:23 +0100
parents ddc87b605019
children 64a0e9636ae6
line wrap: on
line diff
--- a/participant.py
+++ b/participant.py
@@ -108,7 +108,7 @@ class Participant:
 	def createDuplicateOnIRC(self):
 		if isinstance(self.xmpp_c, xmpp.client.Client) or isinstance(self.irc_connection, ServerConnection):
 			return
-		sleep(1) # try to prevent "reconnecting too fast" shit
+		sleep(self.bridge.irc_connection_interval) # to prevent "reconnecting too fast"
 		self.irc_connection = self.bridge.bot.irc.open_connection(self.bridge.irc_server, self.bridge.irc_port, self.duplicate_nickname)
 		self.irc_connection.connect(nick_callback=self._irc_nick_callback)