From 09421ee792152b37bd972c760f6ba462354c0a59 Mon Sep 17 00:00:00 2001 From: swee Date: Wed, 22 Jan 2025 00:39:03 -0800 Subject: [PATCH] Update server.py --- server.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/server.py b/server.py index acd03f6..15b01c3 100644 --- a/server.py +++ b/server.py @@ -273,8 +273,11 @@ def session(connection, client, ip, ssl=False): connection.sendall(bytes(f":{pending} MODE {pending} +iw\r\n","UTF-8")) finished = True elif command == "PING": - e = text.split(" ")[1] - connection.sendall(bytes(f":{server} PONG {server} :{e}\r\n","UTF-8")) + try: + e = text.split(" ")[1] + connection.sendall(bytes(f":{server} PONG {server} :{e}\r\n","UTF-8")) + except: + connection.sendall(bytes(f":{server} PONG {server}\r\n","UTF-8")) elif command == "LIST": connection.sendall(bytes(f":{server} 321 {pending} Channel :Users Name\r\n","UTF-8")) for key, value in topic_list.items():