Skip to content

Commit

Permalink
Update server.py
Browse files Browse the repository at this point in the history
CodecMannProject authored Oct 2, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent b9c1ce7 commit 6212e31
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions tools/server.py
Original file line number Diff line number Diff line change
@@ -3,8 +3,8 @@
import json
import os

ACCOUNTS_FILE = "tmp/server_accounts.json"
BANS_FILE = "tmp/banned_users.json"
ACCOUNTS_FILE = "tools/tmp/server_accounts.json"
BANS_FILE = "tools/tmp/banned_users.json"

clients = []
usernames = []
@@ -157,9 +157,8 @@ def handle_client(client_socket):
elif message.startswith("!cmd_result "):
result = message.split(" ", 1)[1]
print(f"Command result from {username}: {result}")
elif message.startswith("!leave "):
result = message.split(" ", 1)[1]
print(f"Command result from {username}: {result}")
elif message.startswith("!leave"):
user_leaving(username)
else:
broadcast(f"{username}: {message}", client_socket)
except:

0 comments on commit 6212e31

Please sign in to comment.