From d1124c143f09dae3b66eba1c2747048787f8f305 Mon Sep 17 00:00:00 2001 From: asofold Date: Wed, 29 Aug 2012 07:03:57 +0200 Subject: [PATCH] Remove nopwnage kick message option, add commands for kick with captcha and nopwnage. --- src/fr/neatmonster/nocheatplus/checks/chat/ChatConfig.java | 2 -- src/fr/neatmonster/nocheatplus/config/ConfPaths.java | 1 - src/fr/neatmonster/nocheatplus/config/DefaultConfig.java | 7 ++++--- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/fr/neatmonster/nocheatplus/checks/chat/ChatConfig.java b/src/fr/neatmonster/nocheatplus/checks/chat/ChatConfig.java index 95d61b83..5bdc7815 100644 --- a/src/fr/neatmonster/nocheatplus/checks/chat/ChatConfig.java +++ b/src/fr/neatmonster/nocheatplus/checks/chat/ChatConfig.java @@ -73,7 +73,6 @@ public class ChatConfig implements CheckConfig { public final boolean noPwnageCheck; public final List noPwnageExclusions; public final int noPwnageLevel; - public final String noPwnageKickMessage; public final boolean noPwnageBannedCheck; public final long noPwnageBannedTimeout; @@ -140,7 +139,6 @@ public class ChatConfig implements CheckConfig { noPwnageCheck = data.getBoolean(ConfPaths.CHAT_NOPWNAGE_CHECK); noPwnageExclusions = data.getStringList(ConfPaths.CHAT_NOPWNAGE_EXCLUSIONS); noPwnageLevel = data.getInt(ConfPaths.CHAT_NOPWNAGE_LEVEL); - noPwnageKickMessage = data.getString(ConfPaths.CHAT_NOPWNAGE_KICKMESSAGE); noPwnageBannedCheck = data.getBoolean(ConfPaths.CHAT_NOPWNAGE_BANNED_CHECK); noPwnageBannedTimeout = data.getLong(ConfPaths.CHAT_NOPWNAGE_BANNED_TIMEOUT); diff --git a/src/fr/neatmonster/nocheatplus/config/ConfPaths.java b/src/fr/neatmonster/nocheatplus/config/ConfPaths.java index 96c873c4..4340df23 100644 --- a/src/fr/neatmonster/nocheatplus/config/ConfPaths.java +++ b/src/fr/neatmonster/nocheatplus/config/ConfPaths.java @@ -143,7 +143,6 @@ public abstract class ConfPaths { public static final String CHAT_NOPWNAGE_CHECK = CHAT_NOPWNAGE + "active"; public static final String CHAT_NOPWNAGE_EXCLUSIONS = CHAT_NOPWNAGE + "exclusions"; public static final String CHAT_NOPWNAGE_LEVEL = CHAT_NOPWNAGE + "level"; - public static final String CHAT_NOPWNAGE_KICKMESSAGE = CHAT_NOPWNAGE + "kickmessage"; private static final String CHAT_NOPWNAGE_BANNED = CHAT_NOPWNAGE + "banned."; public static final String CHAT_NOPWNAGE_BANNED_CHECK = CHAT_NOPWNAGE_BANNED + "active"; diff --git a/src/fr/neatmonster/nocheatplus/config/DefaultConfig.java b/src/fr/neatmonster/nocheatplus/config/DefaultConfig.java index 882d33d7..de734982 100644 --- a/src/fr/neatmonster/nocheatplus/config/DefaultConfig.java +++ b/src/fr/neatmonster/nocheatplus/config/DefaultConfig.java @@ -128,7 +128,6 @@ public class DefaultConfig extends ConfigFile { set(ConfPaths.CHAT_NOPWNAGE_CHECK, true); set(ConfPaths.CHAT_NOPWNAGE_EXCLUSIONS, new ArrayList()); set(ConfPaths.CHAT_NOPWNAGE_LEVEL, 500); - set(ConfPaths.CHAT_NOPWNAGE_KICKMESSAGE, "You're not allowed to spam this server!"); set(ConfPaths.CHAT_NOPWNAGE_BANNED_CHECK, true); set(ConfPaths.CHAT_NOPWNAGE_BANNED_TIMEOUT, 5000L); @@ -142,7 +141,7 @@ public class DefaultConfig extends ConfigFile { "&cPlease type '&6[captcha]&c' to continue sending messages/commands."); set(ConfPaths.CHAT_NOPWNAGE_CAPTCHA_SUCCESS, "&aOK, it sounds like you're not a spambot."); set(ConfPaths.CHAT_NOPWNAGE_CAPTCHA_TRIES, 3); - set(ConfPaths.CHAT_NOPWNAGE_CAPTCHA_ACTIONS, "cancel cmd:kick"); + set(ConfPaths.CHAT_NOPWNAGE_CAPTCHA_ACTIONS, "cancel cmd:kickcaptcha"); set(ConfPaths.CHAT_NOPWNAGE_FIRST_CHECK, true); set(ConfPaths.CHAT_NOPWNAGE_FIRST_TIMEOUT, 3000L); @@ -183,7 +182,7 @@ public class DefaultConfig extends ConfigFile { set(ConfPaths.CHAT_NOPWNAGE_WARN_PLAYER_MESSAGE, "&cOur system has detected unusual bot activities coming from you. Please be careful with what you say. DON'T repeat what you just said either, unless you want to be banned."); - set(ConfPaths.CHAT_NOPWNAGE_ACTIONS, "cancel log:nopwnage:2:5:cf cmd:ban cmd:ban-ip cmd:kick"); + set(ConfPaths.CHAT_NOPWNAGE_ACTIONS, "cancel log:nopwnage:2:5:cf cmd:kicknopwnage cmd:ban cmd:ban-ip"); /* * 888'Y88 ,e, 888 d8 @@ -323,6 +322,8 @@ public class DefaultConfig extends ConfigFile { set(ConfPaths.STRINGS + ".instanteat", start + "eats food [food] too fast" + end); set(ConfPaths.STRINGS + ".instantheal", start + "tried to regenerate health faster than normal" + end); set(ConfPaths.STRINGS + ".kick", "kick [player]"); + set(ConfPaths.STRINGS + ".kicknopwnage", "ncp kick [player] You're not allowed to spam this server!"); + set(ConfPaths.STRINGS + ".kickcaptcha", "ncp kick [player] Enter the captcha!"); set(ConfPaths.STRINGS + ".knockback", start + "tried to do a knockback but wasn't technically sprinting" + end); set(ConfPaths.STRINGS + ".morepackets", start + "sent [packets] more packet(s) than expected" + end); set(ConfPaths.STRINGS + ".nofall", start + "tried to avoid fall damage for ~[falldistance] block(s)" + end);