summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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.");
}