diff --git a/src/discord/handlers/DevRequestHandler.java b/src/discord/handlers/DevRequestHandler.java index 41677cd7..f0eb5398 100644 --- a/src/discord/handlers/DevRequestHandler.java +++ b/src/discord/handlers/DevRequestHandler.java @@ -56,17 +56,20 @@ public class DevRequestHandler { break; } - if (commandString.isEmpty() == false) { + if (commandString.isEmpty()) { + MagicBot.sendResponse(event, "Unrecognized Dev command: " + serverCommand + " " + commandArgument); + return; + } + + processBuilder = new ProcessBuilder("/bin/sh", "-c", commandString + " " + commandArgument); - processBuilder = new ProcessBuilder("/bin/sh", "-c", commandString + " " + commandArgument); - try { + try { processBuilder.start(); } catch (IOException e) { - throw new RuntimeException(e); + Logger.info(e.toString()); } MagicBot.sendResponse(event, "Executed on dev: " + serverCommand + " " + commandArgument); Logger.info(event.getAuthor().getName() + " told dev to " + serverCommand + " " + commandArgument); } - } } \ No newline at end of file