Revert change to botspam causing false bans

This commit is contained in:
Alexander Meech 2018-01-12 06:17:22 -05:00
parent 0f1b512dac
commit 854ca9e62c

View File

@ -24,7 +24,7 @@ public class SpamText
public boolean isSpam(String message) public boolean isSpam(String message)
{ {
//System.out.println(message.toLowerCase() + " vs " + _text.toLowerCase() + " == " + message.toLowerCase().contains(_text.toLowerCase())); //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() public int getId()
@ -76,10 +76,4 @@ public class SpamText
{ {
_disabledBy = disabledBy; _disabledBy = disabledBy;
} }
private static String clean(String text)
{
// Replace all non alphanumeric/whitespace characters
return text.toLowerCase().replaceAll("[^\\w\\d\\s]", "");
}
} }