From d3f6d4e6434527569d13f211a0eb074c5a11992e Mon Sep 17 00:00:00 2001 From: RblSb Date: Tue, 8 Nov 2022 21:40:08 +0300 Subject: Ignore empty slash command --- res/client.js | 3 +++ src/client/Main.hx | 1 + 2 files changed, 4 insertions(+) diff --git a/res/client.js b/res/client.js index 9669afe..90e026c 100644 --- a/res/client.js +++ b/res/client.js @@ -1969,6 +1969,9 @@ client_Main.prototype = { } var args = StringTools.trim(command).split(" "); command = HxOverrides.substr(args.shift(),1,null); + if(command.length == 0) { + return false; + } switch(command) { case "ban": this.mergeRedundantArgs(args,0,2); diff --git a/src/client/Main.hx b/src/client/Main.hx index 26d4518..ec3d89c 100644 --- a/src/client/Main.hx +++ b/src/client/Main.hx @@ -856,6 +856,7 @@ class Main { if (!command.startsWith("/")) return false; final args = command.trim().split(" "); command = args.shift().substr(1); + if (command.length == 0) return false; switch (command) { case "ban": -- cgit v1.2.3