Don't attempt to identify with no password set
Some servers disconnect the client if PASS fails, so the bot will fail to connect unless SERVER_PASS is also explicitly set to None.
This commit is contained in:
parent
cef59bce73
commit
bde640c9ae
@ -181,7 +181,8 @@ class IRCClient:
|
||||
|
||||
self.send("CAP LS 302")
|
||||
|
||||
if self.server_pass and (not self.sasl_auth or "{password}" not in self.server_pass):
|
||||
if (self.server_pass and "{password}" in self.server_pass
|
||||
and self.password and not self.sasl_auth):
|
||||
message = "PASS :{0}".format(self.server_pass).format(
|
||||
account=self.authname if self.authname else self.nickname,
|
||||
password=self.password)
|
||||
|
@ -75,7 +75,7 @@ def connect_callback(cli):
|
||||
wolfgame.connect_callback()
|
||||
|
||||
# just in case we haven't managed to successfully auth yet
|
||||
if not botconfig.SASL_AUTHENTICATION:
|
||||
if botconfig.PASS and not botconfig.SASL_AUTHENTICATION:
|
||||
cli.ns_identify(botconfig.USERNAME or botconfig.NICK,
|
||||
botconfig.PASS,
|
||||
nickserv=var.NICKSERV,
|
||||
|
Loading…
Reference in New Issue
Block a user