3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-12-25 12:12:53 +01:00

clientbot: make SASL timeout configurable & raise default to 15 secs

This commit is contained in:
James Lu 2017-04-05 23:08:17 -07:00
parent 69c25b5954
commit 9d50a4363b
2 changed files with 4 additions and 1 deletions

View File

@ -365,6 +365,9 @@ servers:
#sasl_username: "mIRCsKripterz" #sasl_username: "mIRCsKripterz"
#sasl_password: "DownLoaditn00b!!!" #sasl_password: "DownLoaditn00b!!!"
# Defines the SASL timeout - this defaults to 15 seconds.
#sasl_timeout: 15
# If this option is enabled, the bot will attempt SASL authentication even after it's # If this option is enabled, the bot will attempt SASL authentication even after it's
# connected, as services become available throughout netsplits and reconnects. # connected, as services become available throughout netsplits and reconnects.
# Note: This requires an IRC server capable of IRCv3.2 cap-notify and sasl: # Note: This requires an IRC server capable of IRCv3.2 cap-notify and sasl:

View File

@ -83,7 +83,7 @@ class ClientbotWrapperProtocol(Protocol):
log.info('(%s) Skipping SASL due to timeout; are the IRCd and services configured ' log.info('(%s) Skipping SASL due to timeout; are the IRCd and services configured '
'properly?', self.irc.name) 'properly?', self.irc.name)
self.capEnd() self.capEnd()
self._cap_timer = threading.Timer(5, capEnd) self._cap_timer = threading.Timer(self.irc.serverdata.get('sasl_timeout') or 15, capEnd)
self._cap_timer.start() self._cap_timer.start()
# This is a really gross hack to get the defined NICK/IDENT/HOST/GECOS. # This is a really gross hack to get the defined NICK/IDENT/HOST/GECOS.