CensorIt
How to use video by Samkio and Torrent
Tired of people cursing on your server and reading their immature messages or what they think of your family? Search no more! CensorIt is the plugin for you. CensorIt has been specifically designed to remove unwanted words no matter how they are spelt, let it be with special characters, repeated characters, spaces or capitals!
The plugin contains a list of censored words and a list of allowed words. This way you can censor for example ass without censoring glass, assassin, grass, etc. You only need to add the normal form of the word in lower case. For example if you censor only ass, the plugin takes care of preventing ass, AsS, @$$, a ss, a.ss, a s s or a_s_s.
The plugin also has a learning function with which verifies online for the existence of a word and automatically adds them to the allowed list. It makes censoring a little slower at first, but as words are added automatically to the allowed lists it will become faster.
The plugin also contains a public API which can be used by Other plugins to censor many different things involving text like signs, whispers, shouts (these features are not included in this simple plugin).
Installation
- Get the latest recommended build of CraftBukkit here.
- Download file CensorIt.jar and place it in your Plugins subfolder
- Start the server once and stop it.
- Go in folder Plugins\CensorIt
- Open file censored.txt and add the words that you want to censor. It is suggested to modify these files in Notepad++.
- Optional : Open file allowed.txt and add the words that you want to prevent from being censored. (e.g. assassin, grass, glass)
- Optional : Open file replacement.txt and add the words that you want to use as replacement words when /censorit replaceon is active. (e.g. cloud, hug, happy)
- Start your server
Commands
General commands (require CensorIt.word and/or CensorIt.admin permissions)- /censorit config - List configuration commands.
- /censorit word - List word management commands.
- /censorit enable - Server-wide enable censoring.
- /censorit disable - Server-wide disable censoring.
- /censorit reload - Reload configuration.
- /censorit verify - SLOW! Verify words online (added to allowed list). Currently using http://dictionary.cambridge.org/ dictionary. Other plugins can change this property through the API.
- /censorit unverify - Stop verifying words online.
- /censorit replaceon - Enable word replacement (e.g. bird, flower).
- /censorit replaceoff - Disable word replacement.
- /censorit censor|uncensor - Censor or uncensor a word. (e.g. ass, fuck)
- /censorit allow|unallow - Allow or unallow a word. (e.g. grass, assassin)
- /censorit replace|unreplace - Add or remove a replacement word. (e.g. bird, flower)
How to connect to the API from your plugin
- Add an external reference to CensorIt.jar
- Modify your onEnable event to verify if the CensorIt plugin is present like so : getServer().getPluginManager().isPluginEnabled("CensorIt")
- In the class you want to use the API in, import com.worldcretornica.censorit.CensorItAPI
- You do not need to instantiate the API, it is a static class and contains the same configuration as other plugins. Just type CensorItAPI.something to get the list of available commands.
- Basic usage : use the function CensorItAPI.censor(string) to receive the string censored
Things to do
- Save the censoring state configurations : verify, enabled, replace words. Currently only the word lists are saved.
- Add option to color censored words/replacement words.
- If possible, need to find a way to disable censoring for the current player. Best would be to leave this to other plugins to implement. If someone has a suggestion on how to implement this without breaking other plugins please tell me how.
- Check for 8 used as a b and () used as an o
- Fix incompatibility with SpamHammer. Censored text don't count as spam for some reason
- Put option to censor IPs
- Add other charset support (e.g. russia). I thought they would already work but I've been told otherwise.
Changelog
Version 0.1- Initial release
@deleted_8156133
Yeah, this is a feature I want.
When you chat normally, it censors everything like it should, but when you send private messages it doesn't censor anything. (Ex. I censor ass. Then I type "This is a test. Ass." it shows up as: "this is a test &?", but then I send a message through private chat as: "/msg playername This is a test. Ass." It shows up as: "[me -> playername]This is a test. Ass." Please fix this if you can.
When ever something gets censored, weird stuff happens to the String. So if my string is something like "This is a test! Fuck." will become "This is a testi ?$!". Can you fix this? It gets pretty annoying when I say a censored word and all my correct punctuation, spelling, and grammar disappears.
Will you ever add an option for phrases.
So If I ban the word ass
i can allow the word assassin
and it block @ss , and a s s
But if I type:
as something
then it shows up as:
a &%/$ omething
Sooooooo I need to be able to allow word phrases
@Rogueleader89
I have the same problem. I don't know why... I haven't had time to test it. Is it verify, verifying that each letter is a word and therefore bypassing the censor?
Whatever it is, it needs to be fixed :( Please, zachbora! :)
@AndrewsPanda
I'm having the same issue (all words showing up w i t h s p a c e s like that), only other thing affecting chat is herochat, doesn't matter if they are allowed or restricted or anything, happens to all text.
Can you add a option to always turn on replace?
I use an antipwnage plugin, and it tracks repitition, and if it randomizes part of it, it will throw off the plugin.
Please add this :D
@zachbora
Ok... I added all letter alternatives :D
The only annoying part is that it verify shuts off after every restart... So I am constantly turning it back on, but sometimes I forget...
Hope the /censorit verify is saved soon, so that way I can restart and still have it on! :D
<<reply 678780="">>
For the V and U think I would suggest you to censor both. I already replace numbers and symbols into letters but letters into letters is a harder thing to do. So add both fuck and fvck.
Please get the first thing on the to-do list completed soon !!!! :D
The server restarts every 6h, so I have to manually type the command again...
Also, V can be used for U.
Add other charset support (e.g. russia). I thought they would already work but I've been told otherwise.
THX!
Is it possible if we get a permission node that will let us use bad words?
@Zombiemold
Can't you just disable it?
would love to have support for censoring "/me"
PLS, add support KOI-8
http://en.wikipedia.org/wiki/KOI_character_encodings
@S3thc0n
You wouldn't need prefix support as such, just replace the word hate with &khate&f
Does this plugin still censor words with colours in the middle i.e fu&fck.
Could add the possibility for prefixing the detected words? (Thinking of the &k color code which makes words unreadable AND super fancy)
@zachbora
Derp. I didn't even read the error fully >.<
@np98765
remove that "bit(h" from your censored words and it might work after.
The error I get whenever someone speaks.
Running this on 1.2.4...