summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2021-08-16 19:24:25 -0300
committerJesusaves <cpntb1@ymail.com>2021-08-16 19:24:25 -0300
commit239358745f0827906f77e52341551cb58fd59329 (patch)
tree93868143a2fef8c743c5f362cb48dcc6380549ee
parentb6a3272cfe03fe98bf06dd4bee08334d654f80f9 (diff)
downloadserver-239358745f0827906f77e52341551cb58fd59329.tar.gz
server-239358745f0827906f77e52341551cb58fd59329.tar.bz2
server-239358745f0827906f77e52341551cb58fd59329.tar.xz
server-239358745f0827906f77e52341551cb58fd59329.zip
Fix the `debug` command from server console
-rwxr-xr-xserver.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/server.py b/server.py
index 84ab8b1..6e4bcc2 100755
--- a/server.py
+++ b/server.py
@@ -27,7 +27,7 @@ from websock import WebSocketServer, WebSocket
## Local Modules
from utils import stdout, now, clients, debug
from consts import MAX_CLIENTS, PACKET_ACK
-import protocol, security, player, traceback
+import protocol, security, player, utils, traceback
###############################################################
# Configuration
@@ -220,9 +220,11 @@ try:
elif cmd in ["dbg", "debug"]:
if debug == 2:
debug = 0
+ utils.debug = 0
else:
debug += 1
- stdout("Changed debug mode to %d" % debug)
+ utils.debug += 1
+ stdout("Changed debug mode to %d" % debug, 0)
elif cmd in ["raw", "eval"] and debug:
try:
print(eval(com))