Update server.py
All checks were successful
/ check (push) Successful in 9s

This commit is contained in:
Nova Cat 2025-01-29 19:59:46 -08:00
parent aaff5b977e
commit 30f923aac8

View file

@ -709,16 +709,15 @@ def session(connection, client, ip, isssl=False):
connection.sendall(bytes(f":{server} 401 {pending} {target} :No such nick/channel\r\n","UTF-8"))
else:
connection.sendall(bytes(f":{server} 461 {pending} {command} :Not enough parameters\r\n","UTF-8"))
# Ignore empty text
elif text.split(" ")[0] == "":
pass
else:
# Unknown command
cmd = text.split(" ")[0]
connection.sendall(bytes(f":{server} 421 {pending} {cmd} :Unknown command\r\n","UTF-8"))
else:
pendingCommands.append(text)
# Ignore empty text
elif text.split(" ")[0] == "":
pass
else:
# Unknown command
cmd = text.split(" ")[0]
connection.sendall(bytes(f":{server} 421 {pending} {cmd} :Unknown command\r\n","UTF-8"))
except ssl.SSLEOFError:
print("EOF occured...")
except Exception as ex: