mirror of
https://github.com/randyjc/Rahoot.git
synced 2026-03-13 20:15:35 +01:00
Emit total players count to clients in the room on player join and kick events
This commit is contained in:
@@ -37,6 +37,9 @@ const Manager = {
|
||||
io.in(playerId).socketsLeave(game.room)
|
||||
io.to(player.id).emit("game:kick")
|
||||
io.to(game.manager).emit("manager:playerKicked", player.id)
|
||||
|
||||
// Emit updated total players to all clients in the room
|
||||
io.to(game.room).emit("game:totalPlayers", game.players.length)
|
||||
},
|
||||
|
||||
startGame: async (game, io, socket) => {
|
||||
|
||||
Reference in New Issue
Block a user