Emit the correct event
This commit is contained in:
parent
46620ec326
commit
150a719116
1 changed files with 1 additions and 1 deletions
|
|
@ -38,7 +38,7 @@ export const KickPlayer = (io: Server, socket: Socket, data: KickPlayer) => {
|
|||
// Ensure the user can be kicked during the state
|
||||
if (game.status !== `lobby`) {
|
||||
log.error(`Cannot kick a player from the game when not in the lobby. (state=${game.status})`);
|
||||
socket.emit(`GameJoined`, {
|
||||
socket.emit(`PlayerKicked`, {
|
||||
success: false,
|
||||
message: `Cannot kick a player when the game is in progress.`,
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue