mirror of
https://github.com/NoCheatPlus/NoCheatPlus.git
synced 2025-01-04 23:07:44 +01:00
Really only run the check if it is enabled.
This commit is contained in:
parent
c902b5d249
commit
3e5bdfac18
@ -76,9 +76,8 @@ public class ChatCheckListener implements Listener, EventManager {
|
|||||||
data.botcheckpassed = true;
|
data.botcheckpassed = true;
|
||||||
} else {
|
} else {
|
||||||
data.botcheckpassed = false;
|
data.botcheckpassed = false;
|
||||||
|
spambotCheck.startTestForProxies(event.getPlayer(), event.getPlayer().getAddress().getAddress().getHostAddress());
|
||||||
}
|
}
|
||||||
|
|
||||||
spambotCheck.startTestForProxies(event.getPlayer(), event.getPlayer().getAddress().getAddress().getHostAddress());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<String> getActiveChecks(ConfigurationCacheStore cc) {
|
public List<String> getActiveChecks(ConfigurationCacheStore cc) {
|
||||||
|
@ -9,6 +9,7 @@ import cc.co.evenprime.bukkit.dnsbl.ProxyServerChecker;
|
|||||||
import cc.co.evenprime.bukkit.nocheat.NoCheat;
|
import cc.co.evenprime.bukkit.nocheat.NoCheat;
|
||||||
import cc.co.evenprime.bukkit.nocheat.NoCheatPlayer;
|
import cc.co.evenprime.bukkit.nocheat.NoCheatPlayer;
|
||||||
import cc.co.evenprime.bukkit.nocheat.actions.ParameterName;
|
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
|
* 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;
|
boolean cancelled = false;
|
||||||
|
|
||||||
if(failures.size() > 0) {
|
if(failures.size() > 0 && config.spambotCheck && !player.hasPermission(Permissions.CHAT_SPAM_BOT)) {
|
||||||
data.spamBotFailed = new LinkedList<String>(failures);
|
data.spamBotFailed = new LinkedList<String>(failures);
|
||||||
// cancelled means the player stays in "spambot" status
|
// cancelled means the player stays in "spambot" status
|
||||||
cancelled = executeActions(ncplayer, config.spambotActions.getActions(failures.size()));
|
cancelled = executeActions(ncplayer, config.spambotActions.getActions(failures.size()));
|
||||||
|
Loading…
Reference in New Issue
Block a user