DiscordSRV

DiscordSRV

86.8k Downloads

Unexpected behavior when console channel phrase filtering is in whitelist mode

Ivan-Johnson opened this issue ยท 0 comments

commented

When the console channel phrase list in the config is set to behave like a whitelist (i.e. DiscordConsoleChannelDoNotSendPhrasesActsAsWhitelist is true) it requires that console output match all phrases instead of requiring at least one phrase. A commit from a couple months ago (f742add) rewrites the relevant logic, replacing a .stream().....anyMatch with a for loop that is equivalent when in blacklist mode but appears to introduces the buggy behavior for whitelist mode.

I have confirmed the unexpected behavior using build 1.19.0, but I haven't been able to verify that f742add introduces the unexpected behavior since I can't figure out how to use Intellij Idea to build a release jar.

The easy solution is just to revert f742add, but I've got a forthcoming pull request that should fix the issue while still preserving the use of a for loop instead of a stream. My "fix" is untested.