Command notify should not be case sensitive.

This commit is contained in:
cnaude 2015-05-08 06:47:27 -07:00
parent 44cc7de81f
commit 6de8c7957c
2 changed files with 8 additions and 3 deletions

View File

@ -71,6 +71,9 @@ public class GamePlayerCommandPreprocessingListener implements Listener {
}
}
for (PurpleBot ircBot : plugin.ircBots.values()) {
if (!ircBot.channelCmdNotifyEnabled) {
return;
}
if (msg.startsWith("/")) {
String cmd;
String params = "";
@ -81,8 +84,11 @@ public class GamePlayerCommandPreprocessingListener implements Listener {
cmd = msg;
}
cmd = cmd.substring(0);
if (ircBot.channelCmdNotifyEnabled && !ircBot.channelCmdNotifyIgnore.contains(cmd)) {
ircBot.commandNotify(event.getPlayer(), cmd, params);
for (String s : ircBot.channelCmdNotifyIgnore) {
if (s.equalsIgnoreCase(cmd)) {
ircBot.commandNotify(event.getPlayer(), cmd, params);
break;
}
}
}
}

View File

@ -24,7 +24,6 @@ import java.net.URL;
import java.net.URLConnection;
import org.bukkit.command.CommandSender;
import org.bukkit.scheduler.BukkitTask;
import org.json.simple.JSONArray;
import org.json.simple.JSONObject;
import org.json.simple.JSONValue;