Compare commits
2 Commits
1aca2d58b3
...
5df58feb31
Author | SHA1 | Date |
---|---|---|
Marlow Alfonso | 5df58feb31 | |
Marlow Alfonso | 23268488f9 |
8
run.py
8
run.py
|
@ -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"]))
|
||||
|
@ -144,6 +147,11 @@ You can log in to your character typing:
|
|||
add_player(id, name, pl["species"], pl["description"], pl["room"])
|
||||
waitlist.pop(id)
|
||||
break
|
||||
else:
|
||||
found = False
|
||||
for name, pl in characters.items():
|
||||
if params_list[0] == name: found = True
|
||||
if not found: mud.send_message(id, "Character '{}' not found".format(params_list[0]))
|
||||
|
||||
else:
|
||||
mud.send_message(id, "Unknown command " + command)
|
||||
|
|
Loading…
Reference in New Issue