Update server.py

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

View file

@ -164,11 +164,17 @@ def session(connection, client):
connection.close() connection.close()
break break
elif text.split(" ")[0] == "":
pass
else: # Ignore empty text
cmd = text.split(" ")[0] elif text.split(" ")[0] == "":
connection.sendall(bytes(f":{server} 421 {pending} {cmd} :Unknown command\r\n","UTF-8")) pass
else:
# Unknown command
cmd = text.split(" ")[0]
connection.sendall(bytes(f":{server} 421 {pending} {cmd} :Unknown command\r\n","UTF-8"))
except: except:
print(traceback.format_exc()) print(traceback.format_exc())