diff --git a/oyoyo/client.py b/oyoyo/client.py index 53438e5..38c8ffa 100644 --- a/oyoyo/client.py +++ b/oyoyo/client.py @@ -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) diff --git a/src/handler.py b/src/handler.py index 47ce8df..1589b2c 100644 --- a/src/handler.py +++ b/src/handler.py @@ -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,