summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLieuwe 'kaasje' Rooijakkers <lieuwerooijakkers@gmail.com>2018-03-31 20:32:54 +0200
committerTom Smeding <tom.smeding@gmail.com>2018-04-01 19:45:42 +0200
commitda3249314f0f003dca21f8803de4ef7a13dbb045 (patch)
tree63a6c098dc8770e7e664a70ab2d4d94ff7bcd0ea
parentce9a2a08d3a6e42c6a2a693c4e4d9214f24e1db5 (diff)
Fix stupid mistakesHEADmaster
-rwxr-xr-xclient.js8
1 files 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.");
}