Remove the player's socket from the room.
This commit is contained in:
parent
b8f71fbc46
commit
4bac811e2b
1 changed files with 2 additions and 0 deletions
|
|
@ -45,6 +45,8 @@ export const KickPlayer = (io: Server, socket: Socket, data: KickPlayer) => {
|
|||
return;
|
||||
};
|
||||
|
||||
io.sockets.connected[game.players[data.target].socket].leave(game.code);
|
||||
|
||||
game.remove_player(data.target, data.ban);
|
||||
log.info(`Removed ${data.target} from ${data.game_code}`);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue