diff options
author | Jesusaves <cpntb1@ymail.com> | 2020-12-17 21:29:00 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2020-12-17 21:29:00 -0300 |
commit | acf3978aaa5b4d92495d7eba90fcfdd96410bc3f (patch) | |
tree | 7b067f974822e7401bdad7e8dd7db01937f72a99 /server.py | |
parent | bab52768050b4f43f75a5a2df5bfa40f1d5aa000 (diff) | |
download | server-acf3978aaa5b4d92495d7eba90fcfdd96410bc3f.tar.gz server-acf3978aaa5b4d92495d7eba90fcfdd96410bc3f.tar.bz2 server-acf3978aaa5b4d92495d7eba90fcfdd96410bc3f.tar.xz server-acf3978aaa5b4d92495d7eba90fcfdd96410bc3f.zip |
Fix a few typos, try to cleanup
Diffstat (limited to 'server.py')
-rwxr-xr-x | server.py | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -142,16 +142,19 @@ try: # Parse the command if cmd in ["broadcast", "global", "msg", "say"]: sendmsg("NOTICE:" + com) - if cmd in ["ban", "block", "nuke"]: + elif cmd in ["ban", "block", "nuke"]: security.ban_ip(com) - if cmd in ["exit", "quit", "close", "term", "end"]: + elif cmd in ["exit", "quit", "close", "term", "end"]: + stdout("Preparing to close server...") break else: stdout("ERROR: Unknown command.") except: - stdout("Terminating!") + stdout("Abrupt error: Terminating!") # TODO: Cleanup here +for c in clients: + c.close(reason="Server is shutting down") print("Server finished.") |