From da3249314f0f003dca21f8803de4ef7a13dbb045 Mon Sep 17 00:00:00 2001 From: Lieuwe 'kaasje' Rooijakkers Date: Sat, 31 Mar 2018 20:32:54 +0200 Subject: Fix stupid mistakes --- client.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/client.js b/client.js index 46fc0eb..cb8a4c5 100755 --- a/client.js +++ b/client.js @@ -153,7 +153,7 @@ async function roomMenu() { const name = await keyboard.prompt("Player name to invite: "); const reply = await conn.send(new protocol.Message("invite-player", name)); if (reply.err) { - console.log(err); + console.log(reply.err); } else { console.log("Player successfully invited."); } @@ -162,9 +162,11 @@ async function roomMenu() { case 3: { const name = await keyboard.prompt("Player name to kick: "); - const reply = await conn.send(new protocol.Message("kick-player", name)); + const reason = await keyboard.prompt("Reason for kicking (optional): "); + const reply = await conn.send(new protocol.Message("kick-player", name, reason)); + console.log(reply); if (reply.err) { - console.log(err); + console.log(reply.err); } else { console.log("Player successfully kicked."); } -- cgit v1.2.3-70-g09d2