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
[SEVERE] Could not pass event PlayerChatEvent to CensorIt org.bukkit.event.EventException at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:303) at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:459) at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:785) at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:763) at lishid.orebfuscator.hook.NetServerHandlerProxy.a(NetServerHandlerProxy.java:117) at net.minecraft.server.Packet3Chat.handle(Packet3Chat.java:33) at net.minecraft.server.NetworkManager.b(NetworkManager.java:229) at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:112) at lishid.orebfuscator.hook.NetServerHandlerProxy.a(NetServerHandlerProxy.java:60) at net.minecraft.server.NetworkListenThread.a(NetworkListenThread.java:78) at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:554) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:452) at net.minecraft.server.ThreadServerApplication.run(SourceFile:490) Caused by: java.util.regex.PatternSyntaxException: Dangling meta character '+' near index 15
@Swords761
It would probably have worked fine without the specially written words like @$$ and b!+ch
@zachbora
It's a long list; I'm guessing it has something to do with the fact that some words had "+", "0-9", "-", "@", among other symbols that are not alphanumeric.
We were using this list I found: http://cloud.github.com/downloads/junkmanuk/JunksChatProtect/words.txt
Our server switched to another censor plugin for now that works for us. Not your fault though, this is a good censoring plugin xD
@Swords761
Can you provide your list of censored words? In a pastebin perhaps.
I'm running myself a server on 1.2.3-R0.2 and didnt have these errors.
Getting this error in Bukkit Beta Build R0.2 with v0.2:
19:49:51 [SEVERE] Could not pass event PlayerChatEvent to CensorIt
org.bukkit.event.EventException at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:303) at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:441) at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:871) at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:849) at net.minecraft.server.Packet3Chat.handle(Packet3Chat.java:33) at net.minecraft.server.NetworkManager.b(NetworkManager.java:229) at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:116) at net.minecraft.server.NetworkListenThread.a(NetworkListenThread.java:78) at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:554) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:452) at net.minecraft.server.ThreadServerApplication.run(SourceFile:490) Caused by: java.util.regex.PatternSyntaxException: Dangling meta character '+' near index 11
@kritikIrus
I can't read that. Please type in Russian and I will try to understand.
<<reply 594752>
please can be hary because give me VIP on all life in than plugin
@kritikIrus
No I only understand french and english.
you understand Russian languich
@AndrewsPanda
is HeroChat your only chat modifying plugin? ...Essentials?
zachbora
It is happening to all sentences no matter what the content is
@kritikIrus
I haven't had time to support Russian, someone told me about censoring Russian. I don't know when I'll have time to try it because I am busy lately. I should have time by next week. If I encounter problems I will contact you.
@gv1222
The configurations are cached, they aren't read each time someone types. I have to redo that part of the program, I'm thinking about reading the file modified date and if it changes reload the configs. I might discuss with other devs about it.
@AndrewsPanda
I'm not very good with regex and I believe it's a minor issue. It should only affect sentences with bad words. Does it affect all your sentences?
@S3thc0n
It's already there with the replacement list the only problem is it doesn't save replacement on. I still have to make that change.
Hello I from Russia, you couldn't translate this plug-in into Russian or help to make it Here mine skype if there will be errors excuse I write through the translator.
skype-kritik-css
@zachbora
Im having some problems with the chat censoring, when i set a replacement word in the Replacement.txt it seems that it is reading old words that have ban removed and new words. Also on some occasions the spaces on words are being removed, other times the censor just changes it to #$$@ even though replacements are on. Any fix for this?
Could you add Bananas functionality into this? Like having the bad words replaced with fruit names or other nice things? Would be perfect then, kudos for the great filtering capabilities!
Bukkit: b2036 - R6 CensorIT: V0.2 HeroChat: 5.5
I am having a strange issue where this plugin is spacing every single word typed. So if I say Hello, it will come out as h e l l o
Any possible solutions?
@zachbora
You first :P