fix password check for empty password

This commit is contained in:
Alberto Xamin 2023-01-24 19:28:41 +00:00
parent 9639b6a43b
commit 37eaa751c9

View File

@ -275,7 +275,7 @@ def toggle_replace_with_bot(sid):
def join_room(sid, room):
room_name = room['name']
i = [g.name for g in games].index(room_name)
if games[i].password != '' and games[i].password != room['password'].upper():
if games[i].password != '' and games[i].password != room.get('password', '').upper():
return
if not games[i].started:
print(f'{sid} joined a room named {room_name}')