kangarko / ChatControl-Red

Issue tracker and documentation for the next generation ChatControl Red, the most advanced chat management plugin.
43 stars 22 forks source link

1.20.4: How to block special fonts? #2693

Closed bobhenl closed 4 weeks ago

bobhenl commented 1 month ago

Are you using MySQL?

No

Are you using BungeeCord/Velocity?

No

Question

Hello, some people bypass the swear & discrimination limit by using the special font: image Can I somehow block it? If so, how please?

I already have set this:

  # Evaluate the "match" operator in rules/ as well as other regexes in settings.yml (i.e. in Whitelist)
  # using the unicode flag? Enable this if your server is in a non-English language.
  # NB: When testing on regex101.com make sure you toggle "unicode" flag
  Unicode: false

But may it would be to completely block this type of custom fonts in the chat?

kangarko commented 4 weeks ago

You can uncomment this rule in rules/chat.rs

Prevent special, unicode characters. Those are misused to bypass filters.

Please keep in mind that non-English languages use them, so only uncomment this on English servers.

[WARNING] You must set Rules.Unicode to true in settings.yml for this to work.

match [^\u0000-\u007F]+

then warn {prefix_error}Unicode characters are prohibited.

then deny

If that does not work you need to adjust the "match" according to the correct regular expression. Reg. exprs. are a global language you can find a lot of stuff online or just ask chatgpt