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 14, 2012messages using /me are not filtered.
-
View User Profile
-
Send Message
Posted May 14, 2012Would love to see a way via commands for people to add words to the watch/match list
-
View User Profile
-
Send Message
Posted May 13, 2012<<reply 692013="">>
I stand corrected - looks like there is an event
public void onPlayerCommandPreprocess(PlayerCommandPreprocessEvent event)
That i can lock onto... will look into it...
-
View User Profile
-
Send Message
Posted May 11, 2012<<reply 700134="">>
If the &0-&f colour codes aren't working - I'll add the next release.
As dor OPS, the default is to allow then to swear... if you want to do otherwise you'll need to set up so in permissions.
-
View User Profile
-
Send Message
Posted May 11, 2012<<reply 700108="">>
I'll tweak the next release to not show any message if its blank in config ;)
There is a chatfilter.* ;) I'll add it to the docs.
There's a bug in the censoring text where accents aren't always being decoded. I'll work on it and get a fix in the next release.
-
View User Profile
-
Send Message
Posted May 11, 2012<<reply 692013="">>
Tells?
You mean like whispers and other such inter player messages?
If so 'fraid not - they aren't process as chat - but as commands within each plugin :/
-
View User Profile
-
Send Message
Posted May 10, 2012Is their any way to use colored text to change the censor color in the chat? If their isnt could you add it? I also have a bug where, if i am OP and i swear, it doesnt censor my words. How do i set it to CENSOR words for OP's? Thanks
-
View User Profile
-
Send Message
Posted May 10, 2012Is there a way to disable the profanity message? If not it'd be great if you would add something in the config for that, thanks.
Another thing is you should add a 'chatfilter.*' for giving all permissions
Also I came across a bug or maybe I'm doing something wrong. Here's my config.yml and lang.yml When saying "molést" ("molest" is on our profanity list) we recieve the profanity warning message but it does not censor it
Also when we tried to say "rápé" however, which was on our profanitywordmatch list, it would filter it.
-
View User Profile
-
Send Message
Posted May 6, 2012@SableDnah
Well, I got it all sorted out eventually. Thanks.
Also, is there any way to filter tells? I am using CommandBook at the moment for such things and it seems to not filter them.
-
View User Profile
-
Send Message
Posted May 5, 2012@ryvix
You shouldn't need too. It's set to default to true.
Depending on your permissions system you can add
-chatfilter.canchatOr
To disable chat for a player.
-
View User Profile
-
Send Message
Posted May 5, 2012@SableDnah
So does this mean that now if we update do we have to add in a chatfilter.canchat permission for everyone now?
-
View User Profile
-
Send Message
Posted May 5, 2012@stutiguias
Ok that's swapped over now. Try again? If they can't chat add chatfilter.canchat to your default group.
-
View User Profile
-
Send Message
Posted May 5, 2012@stutiguias
Ahh GM doesn't do the true false thing in he same way - i think it needs -chatfilter.blockchat With the minus in front to negate that node.
I'll probably swap back to KarylFStein's original proposal and have chatfilter.canchat instead :)
-
View User Profile
-
Send Message
Posted May 5, 2012@SableDnah
YUS!
You sir, are a god among gods ;D
-
View User Profile
-
Send Message
Posted May 4, 2012@SableDnah
Groupmanager Essentials and Vault !
-
View User Profile
-
Send Message
Posted May 4, 2012@stutiguias
Apologies - i shall look into it. The new chatfilter.blockchat node is probably defaulting to true.
May I ask what plugin you are using for permissions?
-
View User Profile
-
Send Message
Posted May 4, 2012@SableDnah
this update block all chat... the players can't say nothing... :( i rollback ...
-
View User Profile
-
Send Message
Posted May 4, 2012@gabriel11798 Have put in a few letter substitutions. Try the new aggressiveMatching option in config :)
-
View User Profile
-
Send Message
Posted May 4, 2012@KarylFStein
Permissions node added. Opposite polarity to your gestion - but same thing really ;)
chatfilter.blockchat - defaults to false.
Hope that helps :)
-
View User Profile
-
Send Message
Posted May 2, 2012@KarylFStein That could work. I'll even see if I can have an option to set the permission on players who try to swear - a less restrictive punishment than kicking :)