|
|
@ -56,17 +56,20 @@ public class DevRequestHandler { |
|
|
|
break; |
|
|
|
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(); |
|
|
|
processBuilder.start(); |
|
|
|
} catch (IOException e) { |
|
|
|
} catch (IOException e) { |
|
|
|
throw new RuntimeException(e); |
|
|
|
Logger.info(e.toString()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
MagicBot.sendResponse(event, "Executed on dev: " + serverCommand + " " + commandArgument); |
|
|
|
MagicBot.sendResponse(event, "Executed on dev: " + serverCommand + " " + commandArgument); |
|
|
|
Logger.info(event.getAuthor().getName() + " told dev to " + serverCommand + " " + commandArgument); |
|
|
|
Logger.info(event.getAuthor().getName() + " told dev to " + serverCommand + " " + commandArgument); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |