From 26bd3ddb6f929ae0431957b88d3c576907d9b650 Mon Sep 17 00:00:00 2001 From: Baipyrus Date: Sat, 21 Jan 2023 22:13:29 +0100 Subject: [PATCH] message recipient bugfix --- js/commands.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/js/commands.js b/js/commands.js index c41ea42..5dcfc1d 100644 --- a/js/commands.js +++ b/js/commands.js @@ -5,14 +5,14 @@ function runCommand(input) { return ""; // Exit current level - const modeSplit = chatMode.split(' ')[0]; - if (input.toLowerCase().startsWith("exit") && modeSplit !== "default") { + const modeSplit = chatMode.split(' '); + if (input.toLowerCase().startsWith("exit") && modeSplit[0] !== "default") { cmd_exit(); return ""; } // Handle different chat modes - switch (modeSplit) { + switch (modeSplit[0]) { case "msg": directMessage(modeSplit[1], input); renameToSelf();