diff --git a/src/cc/co/evenprime/bukkit/nocheat/checks/chat/ChatCheckListener.java b/src/cc/co/evenprime/bukkit/nocheat/checks/chat/ChatCheckListener.java index 6feacaf8..b100addc 100644 --- a/src/cc/co/evenprime/bukkit/nocheat/checks/chat/ChatCheckListener.java +++ b/src/cc/co/evenprime/bukkit/nocheat/checks/chat/ChatCheckListener.java @@ -76,9 +76,8 @@ public class ChatCheckListener implements Listener, EventManager { data.botcheckpassed = true; } else { data.botcheckpassed = false; + spambotCheck.startTestForProxies(event.getPlayer(), event.getPlayer().getAddress().getAddress().getHostAddress()); } - - spambotCheck.startTestForProxies(event.getPlayer(), event.getPlayer().getAddress().getAddress().getHostAddress()); } public List getActiveChecks(ConfigurationCacheStore cc) { diff --git a/src/cc/co/evenprime/bukkit/nocheat/checks/chat/SpambotTest.java b/src/cc/co/evenprime/bukkit/nocheat/checks/chat/SpambotTest.java index 25bdace9..37854ebc 100644 --- a/src/cc/co/evenprime/bukkit/nocheat/checks/chat/SpambotTest.java +++ b/src/cc/co/evenprime/bukkit/nocheat/checks/chat/SpambotTest.java @@ -9,6 +9,7 @@ import cc.co.evenprime.bukkit.dnsbl.ProxyServerChecker; import cc.co.evenprime.bukkit.nocheat.NoCheat; import cc.co.evenprime.bukkit.nocheat.NoCheatPlayer; import cc.co.evenprime.bukkit.nocheat.actions.ParameterName; +import cc.co.evenprime.bukkit.nocheat.config.Permissions; /** * The actual spam check is done at "SpamCheck". This will only @@ -38,7 +39,7 @@ public class SpambotTest extends ChatCheck implements ProxyServerCheckResultHand boolean cancelled = false; - if(failures.size() > 0) { + if(failures.size() > 0 && config.spambotCheck && !player.hasPermission(Permissions.CHAT_SPAM_BOT)) { data.spamBotFailed = new LinkedList(failures); // cancelled means the player stays in "spambot" status cancelled = executeActions(ncplayer, config.spambotActions.getActions(failures.size()));