Browse Source

Removal of vestigial string restriction.

Command renamed to #dev
master
MagicBot 2 years ago
parent
commit
825d1897cb
  1. 6
      src/discord/MagicBot.java
  2. 8
      src/discord/handlers/DevRequestHandler.java

6
src/discord/MagicBot.java

@ -217,6 +217,9 @@ public class MagicBot extends ListenerAdapter { @@ -217,6 +217,9 @@ public class MagicBot extends ListenerAdapter {
case "#server":
ServerRequestHandler.handleRequest(event, args);
break;
case "#dev":
DevRequestHandler.handleRequest(event, args);
break;
case "#logs":
LogsRequestHandler.handleRequest(event, args);
break;
@ -226,9 +229,6 @@ public class MagicBot extends ListenerAdapter { @@ -226,9 +229,6 @@ public class MagicBot extends ListenerAdapter {
case "#trash":
TrashRequestHandler.handleRequest(event, args);
break;
case "#devbuild":
DevRequestHandler.handleRequest(event, args);
break;
default:
junkbot(command, args);
break;

8
src/discord/handlers/DevRequestHandler.java

@ -37,12 +37,6 @@ public class DevRequestHandler { @@ -37,12 +37,6 @@ public class DevRequestHandler {
if (args.length == 2)
buildTarget = args[1].toLowerCase().trim();
// only reboot or shutdown
if ("rebootshutdown".contains(serverCommand) == false)
return;
switch (serverCommand) {
case "build" :
@ -67,7 +61,7 @@ public class DevRequestHandler { @@ -67,7 +61,7 @@ public class DevRequestHandler {
} catch (IOException e) {
e.printStackTrace();
}
MagicBot.sendResponse(event, "MagicBot has executed your " + serverCommand);
MagicBot.sendResponse(event, "Executed on dev: " + serverCommand + " " + buildTarget);
Logger.info(event.getAuthor().getName() + " told dev to " + serverCommand + " " + buildTarget);
}
}

Loading…
Cancel
Save