mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-12-26 12:43:09 +01:00
Make the minimum reconnect delay configurable
This commit is contained in:
parent
32198d42c2
commit
94d669ebec
@ -911,6 +911,10 @@ registerGlobalValue(supybot.drivers, 'module',
|
||||
ValidDriverModule('default', _("""Determines what driver module the
|
||||
bot will use. Current, the only (and default) driver is Socket.""")))
|
||||
|
||||
registerGlobalValue(supybot.drivers, 'minReconnectWait',
|
||||
registry.PositiveFloat(10.0, _("""Determines the minimum time the bot will
|
||||
wait before attempting to reconnect to an IRC server.""")))
|
||||
|
||||
registerGlobalValue(supybot.drivers, 'maxReconnectWait',
|
||||
registry.PositiveFloat(300.0, _("""Determines the maximum time the bot will
|
||||
wait before attempting to reconnect to an IRC server. The bot may, of
|
||||
|
@ -92,7 +92,7 @@ class SocketDriver(drivers.IrcDriver, drivers.ServersMixin):
|
||||
return ret
|
||||
|
||||
def resetDelay(self):
|
||||
self.currentDelay = 10.0
|
||||
self.currentDelay = conf.supybot.drivers.maxReconnectWait()
|
||||
|
||||
def _getNextServer(self):
|
||||
oldServer = getattr(self, 'currentServer', None)
|
||||
|
Loading…
Reference in New Issue
Block a user