Fix bug I created with chatfilter and properly remove spaces

This commit is contained in:
Bella 2020-05-08 13:33:54 -04:00
parent 9ab04297b3
commit 003e91efda
No known key found for this signature in database
GPG Key ID: DBD4A6030080C8B3
1 changed files with 4 additions and 1 deletions

View File

@ -77,9 +77,12 @@ public class ChatFilter extends Module {
String line;
tempLines.clear();
while ((line = bufferedReader.readLine()) != null) {
while (customMatch("[ ]$", line) || customMatch("^[ ]", line)) { /* remove trailing spaces */
while (customMatch("[ ]$", line)) { /* remove trailing spaces */
line = line.substring(0, line.length() - 1);
}
while (customMatch("^[ ]", line)) {
line = line.substring(1); /* remove beginning spaces */
}
tempLines.add(line);
}
bufferedReader.close();