Use context for filter instead of moderation option

This commit is contained in:
Draycia committed 2020-07-30 23:38:20 -07:00
1 parent 88af664e61
commit f22003b6e0
3 files changed
+5 -4

No files matched your search

@@ -50,9 +50,9 @@ public class FilterHandler implements Listener {
}
private boolean channelUsesFilter(ChatChannel chatChannel) {
List<String> channels = moderation.getConfig().getStringList("filters.channels");
Object filter = chatChannel.getContext("filter");
return channels.contains("*") || channels.contains(chatChannel.getKey());
return filter instanceof Boolean && ((Boolean) filter);
}
}
@@ -18,8 +18,6 @@ filters:
# Anything in blocked-words will prevent the message from being sent at all.
blocked-words:
- "pineapple doesn't belong on pizza"
channels:
- '*' # Use '*' to mean all channels
clear-chat:
# The message sent to clear chat, you probably want to leave this blank