diff --git a/src/views/Lobby.vue b/src/views/Lobby.vue
index b3e7412..02b3322 100644
--- a/src/views/Lobby.vue
+++ b/src/views/Lobby.vue
@@ -38,10 +38,10 @@
-
+
-
+
@@ -86,11 +86,17 @@ export default {
if (this.is_host) {
let cont = confirm(`Are you sure you want to exit`);
if (cont) {
- alert(`exiting game`)
+ this.$socket.emit(`KillGame`, {
+ game_code: this.game_code,
+ user: this.username,
+ });
};
} else {
- this.$socket.emit(`LeaveGame`, {
- username: this.username
+ this.$socket.emit(`KickPlayer`, {
+ game_code: this.game_code,
+ target: this.username,
+ user: this.username,
+ ban: false,
});
};
},
@@ -120,7 +126,7 @@ export default {
PlayerKicked(data) {
if (data.player === this.username) {
this.$emit(`alert`, {
- message: `You have been kicked from the game by the host.`,
+ message: `You have been removed from the game.`,
classes: [`error`],
});
setTimeout(() => {
@@ -130,7 +136,7 @@ export default {
});
this.$emit(`go-to`, `game-type`);
}, 2000);
- }
+ };
this.players = this.players.filter(x => x !== data.player);
}
},