Update server.py
This commit is contained in:
parent
92b053b024
commit
7e06238602
1 changed files with 11 additions and 5 deletions
16
server.py
16
server.py
|
@ -164,11 +164,17 @@ def session(connection, client):
|
|||
connection.close()
|
||||
break
|
||||
|
||||
elif text.split(" ")[0] == "":
|
||||
pass
|
||||
else:
|
||||
cmd = text.split(" ")[0]
|
||||
connection.sendall(bytes(f":{server} 421 {pending} {cmd} :Unknown command\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"))
|
||||
|
||||
|
||||
|
||||
except:
|
||||
print(traceback.format_exc())
|
||||
|
|
Loading…
Reference in a new issue