Emit the correct event

This commit is contained in:
Oliver-Akins 2020-10-08 23:06:09 -06:00
parent 46620ec326
commit 150a719116

View file

@ -38,7 +38,7 @@ export const KickPlayer = (io: Server, socket: Socket, data: KickPlayer) => {
// Ensure the user can be kicked during the state // Ensure the user can be kicked during the state
if (game.status !== `lobby`) { if (game.status !== `lobby`) {
log.error(`Cannot kick a player from the game when not in the lobby. (state=${game.status})`); 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, success: false,
message: `Cannot kick a player when the game is in progress.`, message: `Cannot kick a player when the game is in progress.`,
}); });