Skip to content

Commit f428bb7

Browse files
committed
Prevent hacked clients from buzzing while buttons locked
1 parent 3747716 commit f428bb7

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ async def disconnect(sid, reason):
160160

161161
@sio.on('buzz')
162162
async def buzz(sid, answer):
163-
if sid in players and not players[sid].buzzed:
163+
if sid in players and not players[sid].buzzed and not players[sid].room.locked:
164164
if len(answer) <= MAX_ANSWER_LENGTH:
165165
logger.info(f'[{players[sid].room.code}][{sid}] Submitted an answer')
166166
players[sid].buzz(answer)

0 commit comments

Comments
 (0)