Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Filter not working. #4

Open
NopeProsOnly opened this issue Jun 14, 2023 · 2 comments
Open

Filter not working. #4

NopeProsOnly opened this issue Jun 14, 2023 · 2 comments

Comments

@NopeProsOnly
Copy link

advanced-chat.json
I have the word "test" in the filteredWords array and it does catch the word and log it to the console, however, it does not prevent the word being sent. It appears you may have forgot to cancel the event.

In case it is related, here is a list of other mods on the server:
installed-mods.yml

@Wesley1808
Copy link
Owner

The text filter doesn't prevent words from being sent altogether. It just replaces them with #### for the amount of letters in the word.

However, by normal means these word replacements can only be done on the clientside for chat messages (the client has a word filter implementation used for realms). Because if its filtered on the server the client will complain that the message was modified. So if you have some mod converting everything into non-chat messages (like no chat reports) this will obviously not work.

One exception to this rule is styledchat which I've added support for manually - but that also only works because they provide the events necessary to properly do this.

@NopeProsOnly
Copy link
Author

Could there be an option to prevent the chat from being sent at all if they contain the regex or the filtered words?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants