mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-02 17:29:22 +01:00
Made pinging the server optional.
This commit is contained in:
parent
38b9cfadc7
commit
cb5c22c9dc
@ -233,6 +233,13 @@ telnetPort = 31337
|
|||||||
###
|
###
|
||||||
poll = 1
|
poll = 1
|
||||||
|
|
||||||
|
###
|
||||||
|
# pingServer: Determines whether the bot will send PINGs to the server it's
|
||||||
|
# connected to in order to keep the connection alive. Sometimes
|
||||||
|
# this seems to result in instability.
|
||||||
|
###
|
||||||
|
pingServer = True
|
||||||
|
|
||||||
###
|
###
|
||||||
# maxHistory: Maximum number of messages kept in an Irc object's state.
|
# maxHistory: Maximum number of messages kept in an Irc object's state.
|
||||||
###
|
###
|
||||||
@ -364,6 +371,7 @@ types = {
|
|||||||
'detailedTracebacks': mybool,
|
'detailedTracebacks': mybool,
|
||||||
'driverModule': mystr,
|
'driverModule': mystr,
|
||||||
'showOnlySyntax': mybool,
|
'showOnlySyntax': mybool,
|
||||||
|
'pingServer': mybool,
|
||||||
'followIdentificationThroughNickChanges': mybool
|
'followIdentificationThroughNickChanges': mybool
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -491,7 +491,8 @@ class Irc(IrcCommandDispatcher):
|
|||||||
else:
|
else:
|
||||||
self.lastTake = now
|
self.lastTake = now
|
||||||
msg = self.queue.dequeue()
|
msg = self.queue.dequeue()
|
||||||
elif now > (self.lastping + conf.pingInterval) and self.afterConnect:
|
elif conf.pingServer and \
|
||||||
|
now > (self.lastping + conf.pingInterval) and self.afterConnect:
|
||||||
if self.outstandingPing:
|
if self.outstandingPing:
|
||||||
s = 'Reconnecting to %s, ping not replied to.' % self.server
|
s = 'Reconnecting to %s, ping not replied to.' % self.server
|
||||||
log.warning(s)
|
log.warning(s)
|
||||||
|
Loading…
Reference in New Issue
Block a user