Add blocked words

This commit is contained in:
Draycia committed 2020-07-30 05:39:42 -07:00
1 parent 6f1b719e44
commit 50bb994688
2 files changed
+8

No files matched your search

@@ -30,6 +30,12 @@ public class FilterHandler implements Listener {
event.setMessage(event.getMessage().replaceAll(entry, filterText));
}
}
if (channelUsesFilter(event.getChannel())) {
for (String entry : moderation.getConfig().getStringList("filters.blocked-words")) {
event.setMessage(event.getMessage().replaceAll(entry, ""));
}
}
}
private boolean channelUsesFilter(ChatChannel chatChannel) {
@@ -10,6 +10,8 @@ filters:
filtered-words:
- 'lag'
- 'la[g]+'
blocked-words:
- 'broccoli sucks'
channels:
- '*' # Use '*' to mean all channels