fix private lobbies

This commit is contained in:
Alberto Xamin 2021-09-01 12:07:27 +03:00
parent 76621efb40
commit aaec015a6c
No known key found for this signature in database
GPG Key ID: 4F026F48309500A2

View File

@ -34,7 +34,7 @@ online_players = 0
blacklist: List[str] = [] blacklist: List[str] = []
def advertise_lobbies(): def advertise_lobbies():
sio.emit('lobbies', room='lobby', data=[{'name': g.name, 'players': len(g.players), 'password': g.password} for g in games if not g.started and len(g.players) < 10 and not g.is_hidden]) sio.emit('lobbies', room='lobby', data=[{'name': g.name, 'players': len(g.players), 'locked': g.password != ''} for g in games if not g.started and len(g.players) < 10 and not g.is_hidden])
sio.emit('spectate_lobbies', room='lobby', data=[{'name': g.name, 'players': len(g.players), 'locked': g.password != ''} for g in games if g.started]) sio.emit('spectate_lobbies', room='lobby', data=[{'name': g.name, 'players': len(g.players), 'locked': g.password != ''} for g in games if g.started])
@sio.event @sio.event