Update server.py

This commit is contained in:
Nova Cat 2024-12-09 10:22:43 -08:00
parent 92b053b024
commit 7e06238602

View file

@ -163,12 +163,18 @@ def session(connection, client):
connection.sendall(bytes(f"ERROR :Closing Link: {client[0]} ({msg})\r\n","UTF-8"))
connection.close()
break
# 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"))
elif text.split(" ")[0] == "":
pass
else:
cmd = text.split(" ")[0]
connection.sendall(bytes(f":{server} 421 {pending} {cmd} :Unknown command\r\n","UTF-8"))
except:
print(traceback.format_exc())