diff options
author | Lieuwe 'kaasje' Rooijakkers <lieuwerooijakkers@gmail.com> | 2018-03-31 20:32:54 +0200 |
---|---|---|
committer | Tom Smeding <tom.smeding@gmail.com> | 2018-04-01 19:45:42 +0200 |
commit | da3249314f0f003dca21f8803de4ef7a13dbb045 (patch) | |
tree | 63a6c098dc8770e7e664a70ab2d4d94ff7bcd0ea | |
parent | ce9a2a08d3a6e42c6a2a693c4e4d9214f24e1db5 (diff) |
-rwxr-xr-x | client.js | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -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."); } |