diff --git a/example-conf.yml b/example-conf.yml index 731a9a1..608490b 100644 --- a/example-conf.yml +++ b/example-conf.yml @@ -365,6 +365,9 @@ servers: #sasl_username: "mIRCsKripterz" #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 # connected, as services become available throughout netsplits and reconnects. # Note: This requires an IRC server capable of IRCv3.2 cap-notify and sasl: diff --git a/protocols/clientbot.py b/protocols/clientbot.py index 5385005..d0a9626 100644 --- a/protocols/clientbot.py +++ b/protocols/clientbot.py @@ -83,7 +83,7 @@ class ClientbotWrapperProtocol(Protocol): log.info('(%s) Skipping SASL due to timeout; are the IRCd and services configured ' 'properly?', self.irc.name) 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() # This is a really gross hack to get the defined NICK/IDENT/HOST/GECOS.