From 854ca9e62c502d4aa0d46b8c09f1cb0b274416f3 Mon Sep 17 00:00:00 2001 From: Alexander Meech Date: Fri, 12 Jan 2018 06:17:22 -0500 Subject: [PATCH] Revert change to botspam causing false bans --- .../Mineplex.Core/src/mineplex/core/botspam/SpamText.java | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/Plugins/Mineplex.Core/src/mineplex/core/botspam/SpamText.java b/Plugins/Mineplex.Core/src/mineplex/core/botspam/SpamText.java index 137a92657..4fae3baf8 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/botspam/SpamText.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/botspam/SpamText.java @@ -24,7 +24,7 @@ public class SpamText public boolean isSpam(String message) { //System.out.println(message.toLowerCase() + " vs " + _text.toLowerCase() + " == " + message.toLowerCase().contains(_text.toLowerCase())); - return clean(message).contains(clean(_text)); + return message.toLowerCase().contains(_text.toLowerCase()); } public int getId() @@ -76,10 +76,4 @@ public class SpamText { _disabledBy = disabledBy; } - - private static String clean(String text) - { - // Replace all non alphanumeric/whitespace characters - return text.toLowerCase().replaceAll("[^\\w\\d\\s]", ""); - } }