summaryrefslogtreecommitdiff
path: root/server.py
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2020-12-17 21:29:00 -0300
committerJesusaves <cpntb1@ymail.com>2020-12-17 21:29:00 -0300
commitacf3978aaa5b4d92495d7eba90fcfdd96410bc3f (patch)
tree7b067f974822e7401bdad7e8dd7db01937f72a99 /server.py
parentbab52768050b4f43f75a5a2df5bfa40f1d5aa000 (diff)
downloadserver-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-xserver.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/server.py b/server.py
index 521df85..4daee20 100755
--- a/server.py
+++ b/server.py
@@ -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.")