From 1499693b04c67b3f3c60d126ef67881b09b18866 Mon Sep 17 00:00:00 2001 From: Pratyush Desai Date: Fri, 16 Jul 2021 21:00:36 +0530 Subject: [PATCH] fix conditional for checking ACK and NAK --- irc_register.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/irc_register.py b/irc_register.py index 824081a..072d851 100644 --- a/irc_register.py +++ b/irc_register.py @@ -58,9 +58,9 @@ def ircregister(userip, username, password, email="*"): elif line.command == "433": return "ERR_NICKNAMEINUSE" _send(irctokens.build("CAP", ["REQ", "draft/account-registration"])) - if line.command == "CAP" and line.params == ["*", "NAK", "draft/account-registration"]: + if line.command == "CAP" and ("NAK" in line.params): return "cap refused" - elif line.command == "CAP" and line.params == ["*", "ACK", "draft/account-registration"]: + elif line.command == "CAP" and ("ACK" in line.params): to_send = irctokens.build("CAP", ["END"]) _send(to_send) if line.command == "PING": -- 2.35.3