ChatFilter
ChatFilter
A chat filter for Bukkit, Spigot and Paper, 1.7.2 to 26.3. It censors or stops swearing in chat and in chat-like commands, sees through the usual disguises, blocks links and spam, and needs nothing installed on the client. Unmodified clients get all of it.
Also for NeoForge: ChatFilter ReForged, the same filter as a server-side mod for Minecraft 1.21.11 and 26.x.
Version 3 is a rebuild of this plugin, sharing its filtering engine with that mod. Most of what was asked for in these comments over the years is in it. Upgrading from 2.x: swap the jar. Your config and word lists are carried over on first start, the originals are kept as backups, and your old block or censor behaviour stays as it was.
Silent by default
A caught word reaches other players as ####. The sender sees exactly what they typed and is
told nothing, so there is nothing to argue with and nothing to work around. Staff with
chatfilter.see read the original.
Prefer the classic approach? Every category can instead:
- REPLACE the word for everyone (
!@$#,****or cartoon swearing) - SHADOW the whole line: a soft-mute where the sender sees it sent and nobody else sees it
- BLOCK it, with "Oi {player}! Mind your language!" if you like
- or just LOG it
Hard to get around
Capitals, accents, leetspeak (sh1t, $h!t), stretched letters (fuuuck), spelled-out letters
(f.u.c.k, s h i t), self-censoring (f*ck), full-width and look-alike letters from other
alphabets, zero-width characters, and colour codes hidden mid-word. List the plain word once.
Kind to innocent words
Part-word and whole-word lists, so ass catches neither class nor grass. There's an allowlist
for the Scunthorpe problem, and regular expressions for anything the lists can't say.
/chatfilter test <text> shows exactly what would be caught, by which entry, and what would happen.
Chat that arrives as a command
/msg, /tell, /w, /r, /me, /say, /mail send, /f chat, and anything else you list.
msg * skips the name: only the message is judged, never the player name, so /msg Assassin hi
works.
And the rest
- Links and IP addresses, including
example dot com, with an allowlist for your own site and a permission for those who may post them - Spam: shouting is lowercased, and repeats and floods are stopped
- Strikes that expire one at a time, and a ladder that can alert staff, warn the player, or run
any command:
mute {player} 10m,kick {player} - Staff alerts with a per-person toggle, and a console log
- Edit the lists in game:
/chatfilter add profanity.words …, saved to the config file - Keyword replies. It still answers "eleven", and you can switch that off for good.
Permissions
Plain Bukkit permissions, so any permissions plugin can grant them. The 2.x names (chatfilter.canswear, canchat, reload) still work.
| Node | Default | Means |
|---|---|---|
chatfilter.chat |
everyone | may chat at all |
chatfilter.bypass |
nobody | not filtered (ops included) |
chatfilter.see |
nobody | reads masked words as written |
chatfilter.links |
nobody | may post links |
chatfilter.alerts |
ops | receives staff alerts |
chatfilter.admin |
ops | uses /chatfilter |
Configuration
plugins/ChatFilter/config.yml, every option commented. The defaults mask the classic word list
silently, block links and floods, quieten shouting, and filter the usual private-message commands.
The severe list ships empty: every server's is different, and nobody should get one they didn't
choose.
Versions
Two files: 1.13 – 26.3 (+bukkit1.13-26.3) and 1.7.2 – 1.12.2 (+bukkit1.7-1.12). Tested
on Paper 1.7.10, 1.8.8, 1.12.2, 1.16.5, 1.20.1, 1.21.11, 26.1.2 and 26.3.
Open source (MIT): GitHub.
-
View User Profile
-
Send Message
Posted May 2, 2012I use this to block anyone joining who is not in an "approved" group from talking by using a swear filter of ''. I'm not too concerned about filtering chat after the user has been added to an "approved" group as the server is for my kids and their friends, etc., and I have to know who they are. But they wanted to be able to show people things they were doing without me adding their account, (I used to use the whitelist, but wasn't fast enough updating it for them), so I made the default access group so someone could view their worlds, but not interact with anything. I didn't want some random person somehow finding the site and saying inappropriate things in chat, and this plug-in lets me do that. Thanks for that!
My feature suggestion is to have some chatfilter permission setting that blocks all chat, but still lets me use the regular swear filter on people who have chat access. Like chatfilter.canchat (defaults to true, but if false has something like a nochatMessage: Sorry, you do not have permissions to chat displayed if they try to chat). Everything else works the same.
Thanks!
-
View User Profile
-
Send Message
Posted Apr 24, 2012@SableDnah
I guess that's true....
DAMMIT INTERNET
-
View User Profile
-
Send Message
Posted Apr 24, 2012@gabriel11798
Yeah as you see - the list of alternatives grows... 3=e !=i 1=i @=a ... etc... etc... and suddenly its not a chat filter - its a l33t decoder :)
Someone determined to swear will find a way. e.g. I bet not many american servers would put "wanker" or "fanny" in the list.
That said - I guess I can do the most common ones... I'll work on an "aggressive match" option and add in some of the more common alias'.
-
View User Profile
-
Send Message
Posted Apr 24, 2012@gabriel11798
It's clever enough to be case insensitive and to ignore accents - so FúcK would get detected. But I'm afraid trying to find every punctuation variation of the words in the match lists would just be too big a hit whenever a message is sent... - and probably too many false positives too.
If you get players using those alot tho - adding "f*ck" and "pen!s" to your match list would help...
-
View User Profile
-
Send Message
Posted Apr 24, 2012@SableDnah
Awesome, Another thing though: Can it block things like fu*k or Pen!s?
-
View User Profile
-
Send Message
Posted Apr 21, 2012I'm glad someone finally created a light-weight plugin like this!
-
View User Profile
-
Send Message
Posted Apr 21, 2012@gabriel11798
Colour support now in place ;)
-
View User Profile
-
Send Message
Posted Apr 21, 2012@ryvix
Reload permissions in place :)
-
View User Profile
-
Send Message
Posted Apr 20, 2012@gabriel11798 Opps - punctuation fail ;)
Yeah - I was kicking myself. I've even written routines for MobHealth to handle colour codes nicely, I should have put them in here too! :)
-
View User Profile
-
Send Message
Posted Apr 20, 2012@SableDnah
Could use a "," It looks like sarcasm, but I get it ;) On the other hand.....
-
View User Profile
-
Send Message
Posted Apr 20, 2012@gabriel11798 You know I haven't tried?!
I'll drop some & colour codes in and test - it might need a 'lil more tweaking to enable them. Will make sure 1.6 supports it ;)
-
View User Profile
-
Send Message
Posted Apr 20, 2012@ryvix
Yeah should be doable. reload only reads the config file in again - so it doesn't do any harm - but best to be safe ;)
-
View User Profile
-
Send Message
Posted Apr 19, 2012THIS. IS. PERFECT! No unecessary kicking/ban punishments, just simple censoring! :D (Does the config.yml and lang.yml have color support? (for the messages))
-
View User Profile
-
Send Message
Posted Apr 18, 2012Hi there,
People who aren't ops are able to reload it with /chatfilter reload
Would it be possible to deny people without permissions or without op to even run /chatfilter at all?
Thanks =)
-
View User Profile
-
Send Message
Posted Apr 10, 2012@Jobsti2 Sure I can do that.
I'll just add chatfilter.canswear so you can dish that out to users as required :)
-
View User Profile
-
Send Message
Posted Apr 9, 2012Heyho,
works great, love it. But could you implement a permission for the chatfilter? Our Server is for 18+ users, we only want to block the words for default users.
Would be great.
-
View User Profile
-
Send Message
Posted Apr 3, 2012@tmad40blue Yay - that'll be my first donation :) Thanks!
I'll have a stop by to see your server later, always on the lookout for safe friendly servers for my little ones to play on - and yours sounded ideal :)
-
View User Profile
-
Send Message
Posted Apr 2, 2012I have been looking for a plugin like this for 6 months. Thank you so much. I will happily donate a bit of money.
I'll install this later tonight on my server (http://www.intercraften.org/ if you want more info) – if you'd like to see it working, I can whitelist you; just submit a request through the website I listed in the previous sentence.
-
View User Profile
-
Send Message
Posted Mar 27, 2012@falsevacuum
There you go, Have spruced up the description - source is now listed above :)
-
View User Profile
-
Send Message
Posted Mar 26, 2012Do you have the source for this posted somewhere? I always like to look at what people write.