From 776e5e4355e2cee3602c886f8d29a2bc9a2504f2 Mon Sep 17 00:00:00 2001 From: swee Date: Mon, 9 Dec 2024 13:33:03 -0800 Subject: [PATCH] Update server.py --- server.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/server.py b/server.py index 3f7f716..7b8daa2 100644 --- a/server.py +++ b/server.py @@ -72,8 +72,9 @@ def session(connection, client): if not ready: username = text.split(" ")[1] ready = True - elif "CAP LS" in text: - connection.sendall(bytes(f":{server} CAP * LS :away-notify", "UTF-8")) + elif command == "CAP": + if args[0] == "LS" + connection.sendall(bytes(f":{server} CAP * LS :away-notify", "UTF-8")) elif (ready and already_set) and not finished: connection.sendall(bytes(f":{server} 001 {pending} :Welcome to the {displayname} Internet Relay Chat Network {pending}\r\n", "UTF-8")) connection.sendall(bytes(f":{server} 002 {pending} :Your host is {server}[{ip}/6667], running version IRCat-v{__version__}\r\n", "UTF-8"))