mirror of
https://git.krews.org/morningstar/Arcturus-Community.git
synced 2024-11-27 08:50:51 +01:00
Ignore case with room-specific wordfilter
This commit is contained in:
parent
0a0091e563
commit
ab04c491fd
@ -85,6 +85,7 @@ import java.util.List;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.concurrent.ScheduledFuture;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.regex.Pattern;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
public class Room implements Comparable<Room>, ISerialize, Runnable {
|
||||
@ -3076,7 +3077,7 @@ public class Room implements Comparable<Room>, ISerialize, Runnable {
|
||||
if (!this.wordFilterWords.isEmpty()) {
|
||||
if (!habbo.hasPermission(Permission.ACC_CHAT_NO_FILTER)) {
|
||||
for (String string : this.wordFilterWords) {
|
||||
roomChatMessage.setMessage(roomChatMessage.getMessage().replace(string, "bobba"));
|
||||
roomChatMessage.setMessage(roomChatMessage.getMessage().replaceAll("(?i)" + Pattern.quote(string), "bobba"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user