Revert change to botspam causing false bans
This commit is contained in:
parent
0f1b512dac
commit
854ca9e62c
@ -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]", "");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user