fix spectate without password
This commit is contained in:
parent
c28e9b2429
commit
c126006198
@ -162,9 +162,9 @@ def toggle_replace_with_bot(sid):
|
|||||||
def join_room(sid, room):
|
def join_room(sid, room):
|
||||||
room_name = room['name']
|
room_name = room['name']
|
||||||
i = [g.name for g in games].index(room_name)
|
i = [g.name for g in games].index(room_name)
|
||||||
if not games[i].started:
|
|
||||||
if games[i].password != '' and games[i].password != room['password'].upper():
|
if games[i].password != '' and games[i].password != room['password'].upper():
|
||||||
return
|
return
|
||||||
|
if not games[i].started:
|
||||||
print(f'{sid} joined a room named {room_name}')
|
print(f'{sid} joined a room named {room_name}')
|
||||||
sio.leave_room(sid, 'lobby')
|
sio.leave_room(sid, 'lobby')
|
||||||
sio.enter_room(sid, room_name)
|
sio.enter_room(sid, room_name)
|
||||||
|
Loading…
Reference in New Issue
Block a user