mirror of https://github.com/kami-blue/client
Fix bug I created with chatfilter and properly remove spaces
This commit is contained in:
parent
9ab04297b3
commit
003e91efda
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue