From aaec015a6cc28cc56aa3e0a404105efa319bf2e1 Mon Sep 17 00:00:00 2001 From: Alberto Xamin Date: Wed, 1 Sep 2021 12:07:27 +0300 Subject: [PATCH] fix private lobbies --- backend/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/__init__.py b/backend/__init__.py index 4df546c..87853fc 100644 --- a/backend/__init__.py +++ b/backend/__init__.py @@ -34,7 +34,7 @@ online_players = 0 blacklist: List[str] = [] 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.event