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()
|
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())
|
||||||
|
|
Loading…
Reference in a new issue