feat: added human-readable runtime logs

This commit is contained in:
Marlow Alfonso 2023-11-17 18:39:32 +00:00
parent 23268488f9
commit 5df58feb31
1 changed files with 3 additions and 0 deletions

3
run.py
View File

@ -86,6 +86,7 @@ def add_player(id, name, species, description, room = "Lobby"):
"description": description,
"room": room
}
print("{} connected as '{}'".format(id, name))
def update():
# Update the server
@ -99,11 +100,13 @@ def update():
Welcome to the UNIX.dog MUCK!!
Type help for a list of commands
''')
print("{} joined the waitlist".format(id))
# Remove disconected players from the list
for id in mud.get_disconnected_players():
if id not in players:
continue
print("{}('{}') disconnected".format(id, players[id]["name"]))
for pid, pl in players.items():
mud.send_message(pid, "{} quit the game".format(players[id]["name"]))