mirror of
https://github.com/cnaude/PurpleIRC-spigot.git
synced 2024-11-29 05:26:19 +01:00
Command preprocessor should not be case sensitive.
This commit is contained in:
parent
6de8c7957c
commit
46c426f92a
@ -50,18 +50,18 @@ public class GamePlayerCommandPreprocessingListener implements Listener {
|
||||
}
|
||||
String msg = event.getMessage();
|
||||
if (event.getPlayer().hasPermission("irc.message.gamechat")) {
|
||||
if (msg.startsWith("/me ")) {
|
||||
if (msg.toLowerCase().startsWith("/me ")) {
|
||||
for (PurpleBot ircBot : plugin.ircBots.values()) {
|
||||
ircBot.gameAction(event.getPlayer(), msg.replace("/me", ""));
|
||||
}
|
||||
} else if (msg.startsWith("/broadcast ")) {
|
||||
} else if (msg.toLowerCase().startsWith("/broadcast ")) {
|
||||
for (PurpleBot ircBot : plugin.ircBots.values()) {
|
||||
ircBot.gameBroadcast(event.getPlayer(), msg.replace("/broadcast", ""));
|
||||
}
|
||||
}
|
||||
}
|
||||
if (plugin.isPluginEnabled("Essentials")) {
|
||||
if (msg.startsWith("/helpop ") || msg.startsWith("/amsg ") || msg.startsWith("/ac ")) {
|
||||
if (msg.toLowerCase().startsWith("/helpop ") || msg.toLowerCase().startsWith("/amsg ") || msg.toLowerCase().startsWith("/ac ")) {
|
||||
if (msg.contains(" ")) {
|
||||
String message = msg.split(" ", 2)[1];
|
||||
for (PurpleBot ircBot : plugin.ircBots.values()) {
|
||||
@ -74,7 +74,7 @@ public class GamePlayerCommandPreprocessingListener implements Listener {
|
||||
if (!ircBot.channelCmdNotifyEnabled) {
|
||||
return;
|
||||
}
|
||||
if (msg.startsWith("/")) {
|
||||
if (msg.toLowerCase().startsWith("/")) {
|
||||
String cmd;
|
||||
String params = "";
|
||||
if (msg.contains(" ")) {
|
||||
|
Loading…
Reference in New Issue
Block a user