From 5e0a56ebef4771c96f5b8f986bc2b404e244e9f3 Mon Sep 17 00:00:00 2001 From: swee Date: Fri, 24 Jan 2025 19:16:08 -0800 Subject: [PATCH] Update server.py --- server.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server.py b/server.py index f056919..ab3dcd6 100644 --- a/server.py +++ b/server.py @@ -230,7 +230,7 @@ def session(connection, client, ip, isssl=False): pass if command == "NICK" and not finished: pending = text.split(" ")[1] - if pending[0] == ":": pending[1:] + if pending[0] == ":": pending = pending[1:] if "!" in pending or ":" in pending or "#" in pending or "*" in pending: connection.sendall(bytes(f":{server} 432 * {pending} :Erroneus nickname\r\n","UTF-8")) pending = "*" @@ -381,7 +381,7 @@ def session(connection, client, ip, isssl=False): pass else: pending2 = text.split(" ")[1] - if pending2[0] == ":": pending2[1:] + if pending2[0] == ":": pending2 = pending2[1:] if "!" in pending2 or ":" in pending2 or "#" in pending2 or "*" in pending2: connection.sendall(bytes(f":{server} 432 {pending} {pending2} :Erroneus nickname\r\n","UTF-8")) elif pending2.lower() in lower_nicks: