diff --git a/LaunchServer/source/command/handler/CommandHandler.java b/LaunchServer/source/command/handler/CommandHandler.java index ee61325..b29e9d0 100644 --- a/LaunchServer/source/command/handler/CommandHandler.java +++ b/LaunchServer/source/command/handler/CommandHandler.java @@ -152,6 +152,7 @@ try { args = parse(line); + if(args.length > 0) args[0] = args[0].toLowerCase(); } catch (Throwable exc) { @@ -212,8 +213,8 @@ public final void registerCommand(String name, Command command) { VerifyHelper.verifyIDName(name); - VerifyHelper.putIfAbsent(commands, name, Objects.requireNonNull(command, "command"), - String.format("Command has been already registered: '%s'", name)); + VerifyHelper.putIfAbsent(commands, name.toLowerCase(), Objects.requireNonNull(command, "command"), + String.format("Command has been already registered: '%s'", name.toLowerCase())); } private void readLoop() throws IOException diff --git a/LaunchServer/source/response/ResponseThread.java b/LaunchServer/source/response/ResponseThread.java index 7cb7d59..ac8e2e9 100644 --- a/LaunchServer/source/response/ResponseThread.java +++ b/LaunchServer/source/response/ResponseThread.java @@ -99,7 +99,7 @@ if (magicNumber != Launcher.PROTOCOL_MAGIC - 1) { // Previous launcher protocol output.writeBoolean(false); - throw new IOException(String.format("#%d Protocol magic mismatch", id)); + if (LogHelper.isDebugEnabled()) throw new IOException(String.format("#%d Protocol magic mismatch", id)); } legacy = true; } @@ -109,7 +109,7 @@ if (!keyModulus.equals(server.privateKey.getModulus())) { output.writeBoolean(false); - throw new IOException(String.format("#%d Key modulus mismatch", id)); + if (LogHelper.isDebugEnabled()) throw new IOException(String.format("#%d Key modulus mismatch", id)); } // Read request type @@ -117,7 +117,7 @@ if (legacy && type != Type.LAUNCHER) { output.writeBoolean(false); - throw new IOException(String.format("#%d Not LAUNCHER request on legacy protocol", id)); + if (LogHelper.isDebugEnabled()) throw new IOException(String.format("#%d Not LAUNCHER request on legacy protocol", id)); } if (!server.serverSocketHandler.onHandshake(id, type)) {