mirror of
https://github.com/cnaude/PurpleIRC-spigot.git
synced 2025-02-27 08:51:22 +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();
|
String msg = event.getMessage();
|
||||||
if (event.getPlayer().hasPermission("irc.message.gamechat")) {
|
if (event.getPlayer().hasPermission("irc.message.gamechat")) {
|
||||||
if (msg.startsWith("/me ")) {
|
if (msg.toLowerCase().startsWith("/me ")) {
|
||||||
for (PurpleBot ircBot : plugin.ircBots.values()) {
|
for (PurpleBot ircBot : plugin.ircBots.values()) {
|
||||||
ircBot.gameAction(event.getPlayer(), msg.replace("/me", ""));
|
ircBot.gameAction(event.getPlayer(), msg.replace("/me", ""));
|
||||||
}
|
}
|
||||||
} else if (msg.startsWith("/broadcast ")) {
|
} else if (msg.toLowerCase().startsWith("/broadcast ")) {
|
||||||
for (PurpleBot ircBot : plugin.ircBots.values()) {
|
for (PurpleBot ircBot : plugin.ircBots.values()) {
|
||||||
ircBot.gameBroadcast(event.getPlayer(), msg.replace("/broadcast", ""));
|
ircBot.gameBroadcast(event.getPlayer(), msg.replace("/broadcast", ""));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (plugin.isPluginEnabled("Essentials")) {
|
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(" ")) {
|
if (msg.contains(" ")) {
|
||||||
String message = msg.split(" ", 2)[1];
|
String message = msg.split(" ", 2)[1];
|
||||||
for (PurpleBot ircBot : plugin.ircBots.values()) {
|
for (PurpleBot ircBot : plugin.ircBots.values()) {
|
||||||
@ -74,7 +74,7 @@ public class GamePlayerCommandPreprocessingListener implements Listener {
|
|||||||
if (!ircBot.channelCmdNotifyEnabled) {
|
if (!ircBot.channelCmdNotifyEnabled) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (msg.startsWith("/")) {
|
if (msg.toLowerCase().startsWith("/")) {
|
||||||
String cmd;
|
String cmd;
|
||||||
String params = "";
|
String params = "";
|
||||||
if (msg.contains(" ")) {
|
if (msg.contains(" ")) {
|
||||||
|
Loading…
Reference in New Issue
Block a user