Fixed blank lines in banned words file issues.
Blank lines resulted in lots of chat being muted which shouldn't have been.
This commit is contained in:
parent
3611c09e7d
commit
41401abfaf
|
|
@ -14,9 +14,12 @@ class WordFinder
|
|||
|
||||
StringBuilder patternBuilder = new StringBuilder();
|
||||
for(String word : wordsToFind)
|
||||
{
|
||||
if(!word.isEmpty() && !word.trim().isEmpty())
|
||||
{
|
||||
patternBuilder.append("|(([^\\w]|^)" + Pattern.quote(word) + "([^\\w]|$))");
|
||||
}
|
||||
}
|
||||
|
||||
String patternString = patternBuilder.toString();
|
||||
if(patternString.length() > 1)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user