PwnFilter
Update: 2023-04-20 - PwnFilter EOL Statement
Major changes to chat from Mojang that include chat reporting and signed messages may render PwnFilter no longer usable. The developers of PwnFiilter have not maintained the plugin since 2016, and it has continued to work up until now. We don't see a new version coming out anytime soon and urge server owners to find an alternative. We hear good things about VentureChat - https://www.spigotmc.org/resources/venturechat.771/
-tremor.
About PwnFilter
PwnFilter is way more than just your average word-blocking plugin, PwnFilter uses the power of Regular-Expressions ("RegEx") to give you a highly effective and highly configurable plugin to filter anything you want from chat! Matching words can be rewritten, logged, blocked, and managed, depending on the rules you define. Use PwnFilter for:
- Extremely effective chat/command filtering: Filter anything you want with RegEx!
- Extremely effective curse/swear word filtering, warn users who use bad language, turn their profanities into harmless language, or just deny their message entirely!
- Assign appropriate punishment levels based on severity.
- Anti-Advertisement: IP/URL filtering
- Make fun chat replacements for your server's inside-jokes.
- Single line spam filtering: Remove repetitive characters like hiiiiiiiiiiiii to hi.
- CAPS Blocking capability
- Typo correction: Replace common and annoying typos like "teh" to "the" or "u" or "you"
- Customizable warning messages
- Command aliases: Automatically recognize a !command and change to /longer command, Stop yourself from accidentally sending those embarrassing .commands to chat for everyone to see.
- A few built-in punishments like burn, kill, fine (charge money!), warn, kick, and ban. Or simply utilize the "then console" action to make your server console execute almost any command from any other plugin as if you typed it yourself in the console window, especially if you use a plugin that adds a plethora of punishments, like PunishMental, or use it to make PwnFilter send the appropriate commands to your favorite ban-management system to let it handle what to do!
Think of this plugin as a platform for the power of RegEx, the matching rules are 100% entirely up to you, and there are a hundred ways to do something. The possibilities are endless, the power is as dynamic as you want it to be depending on how much effort you put into having the best RegEx rules.
PwnFilter is a revival and complete rewrite of the RegexFilter plugin by FloydATC. Thanks to DreamPhreak for helping with this Bukkit page, to Sage905 for taking over the latest branch of development making PwnFilter even better than ever, and to EpicAtrain for developing comprehensive regex rules for server owners to use.
Features:
- Filter Chat! (of course)
- Filter Item Names! (Anvil)
- Filter Signs!
- Filter Commands!
- Filter Console!
- Filter Books! (Coming in next version!)
- Filter Nametags!
- Built-in anti-spam feature can be enabled in config.
- Commands for OP or by permission node.
- Supports color message replacement.
- Globally clear all player's chat windows with "/pfcls".
- Global mute with "/pfmute" - stops all server chat and commands for making admin announcements.
- Command typos beginning with certain characters can be stopped (like . and 7, accidentally instead of / and &).
- Optionally recover those typos and execute the command as intended.
- Define your own macros or command aliases.
- Simple but powerful configuration with built-in debugging.
- Each regular expression is compiled only once => very fast.
- Able to reload all your PwnFilter rules & config files without needing to restart the server with "/pfreload".
- Optionally kick or warn players on rule matches AND/OR:
- Execute commands from console or other plugins.
- Use randrep action to replace swears with a random multiple option.
- Use lower action to replace text to all lowercase (great for those CAPS chatters).
- True command aliases, link faux commands like /wave to /me waves at you.
- Customizable 'permission denied' messages
Issues & Conflicts
Plugin Conflicts: If you notice that PwnFilter conflicts/interferes with another chat-related plugin, edit your config.yml, go to the "ADVANCED" section at the bottom, unhide the priority you want to change (by removing the # in front of the line), and change the priority from the default setting "Lowest" to another setting like "Highest". This can sometimes resolve conflicts, otherwise ask on our forum or create a ticket.
Permission Bypass: The permission node pwnfilter.bypass is automatically granted to OP and players with * permission nodes. If you do not want these players bypassing the filter at all, you must negate this permission node for them in your Permissions Plugin's files.
Plugin Metrics
This plugin utilizes Hidendra's plugin metrics system, which means that some information is collected and sent to mcstats.org. If you wish to disable this feature, you can do so by opting out, which you can do in the PluginMetrics' config file under /YourServer/plugins/PluginMetrics/
Links & Info
- PwnPlantGrowth - Customize, modify, block all plant growth with varying configurations, including biome based and light level based farming.
- PwnChickenLay - Configure or block how fast chickens can lay eggs, or replace eggs with other items like diamonds, bricks, anything you can think of.
- ResPwn - Configure useful and fun player respawn options like temporary forcefields, armor and weapons.
- PwnPvpBalance - Balance the tide of uneven game mechanics with options to help players with poor PvP skills be more competitive, and give good players a better challenge.
- PwnFilter Regex Forum - Have questions about using RegEx or want to show your rules.txt off? Visit our RegEx forum here on DBO!
- Pwn9.com - Visit the Pwn9 Gaming Community, the place we call home. Check out our Minecraft servers, other game servers and fun gaming community.
- Discord Server: Join us @ https://discord.gg/qde6rVn - feel free to ask PwnFilter or RegEx questions on the channel or just come hang out with us.
- Development builds of this project can be acquired at the provided continuous integration server. These builds have not been approved by the BukkitDev staff. Use them at your own risk. ci.sagely.ca
Donate
All of our "Pwn-" plugins are completely free of charge. We work hard to bring you the best, powerful, and up-to-date plugins. If we have helped you in any way, please consider a donation of any amount (Using the "Donate" button on the top-right of this page, or clicking HERE). All donations are GREATLY appreciated for all of the time that goes into this plugin and support.
EpicATrain's version 10.0 filter has been temporarily removed, due to a few issues. The classic language filter is still available here: http://pastebin.com/u/EpicATrain
Ofcourse Java JDK7 lastest ... I'm using only Prefixed for chat formating ;)
@sync667
What Java version are you using? Are you using any other Chat Plugins like iChat or HeroChat? There is obviously a conflict.
Last version bukkit 1.3.2 R1.0
@xclucky
It might be possible to add hooks for other types of messaging, I haven't had the time to work on it recently but it's on my plans for the future list.
In Herochat if someone types /g ThereCensoredMsg to talk in global chat it shows like normal... Non censored... Pls fix? it would help alot.
A while ago someone suggested adding in the ability to filter chat in /tell, couldn't you just simply filter commands? Like if a player types /tell blahblah fuck you, it will filter it before it runs the command. Alternatively, couldn't you simply hook into essentials?
@tremor77
It doesn't conflict with it, you just have to listen for a custom event (If you install pwnfilter with herochat, pwnfilter will have no affect since it isnt listening for a ChatChannelEvent)
Herochat http://forums.spout.org/threads/chat-herochat-5-6-4-cb1-3-1-r1-0.4600/
Not sure if it's currently on devbukkit at the moment though.
I've had no issues with the version compiled from github
@sync667
Just don't use the pwnfilter kick.. use the pwnfilter console option to issue your kick plugins kick command instead.
@netherfoam
I'll take a look, thanks for the suggestion.. this is the first I've heard of HeroChat. Does Pwnfilter conflict with it out of the box? Also, sorry for being lazy but I think my GitHub version of PwnFilter is a bit behind.
I'd like to suggest adding herochat support.
It's relatively simple to do. I've forked pwnfilter and done it myself github.com/netherfoam/PwnFilter/ - you should probably just make a function to parse a generic event instead of copy pasting like I did. But its simple enough.
Cheers.
There is no backreferencing? I'd like to format the chat the way I like and allowing for backreferencing would allow your plugin to even more flexible.
<<code>>
CraftBukkit version git-Bukkit-1.3.2-R1.0-b2377jnks (MC: 1.3.2) (Implementing API version 1.3.2-R1.0)<</code>>
i now what version i must to use ;p
and i now what's means AsyncPlayerChatEvent
so don't think I next stupid "noob" ;)
with authme i think its because this plugin works with mysql and when player quit its update to db his quit
and i don't now how your kick func works but you or autor of authme must add support for pwnfilter kick
@sync667
In your first post the plugin causing a problem is not PwnFilter it is Authme - are you running an offline server?
Then in your second post your having an issue with the AsyncPlayerChatEvent - which makes me think you are running an older server.. what version of craftbukkit are you using? Since Pwnfilter 1.8 you MUST be using atleast CB 1.3 or newer.. otherwise, download an older version of PwnFilter
plugin is still laging server
when i use kick func
thx men .. last version was shit .. server oveloaded and read timed out ;/
we will see new ;)
Just wanted to let everyone know I'm still around and will continue to develop this project.. just been busy with real life for the last month.. expect a CB1.3.2-R1.0 update for this real soon, although I'm pretty sure that pwnfilter 1.8.0 will still work for you.. so go ahead and upgrade your server without worrying.
@DreamPhreak1
Much appreciated, helped me alot with creating rules.
@Har88
+ Matches the previous character/token one or more times. It is a greedy match, and it will try to match as many characters as possible.
So, for example, if you wanted to match a whole word, like "Nyan" as many times as possible, you would do (Nyan)+, and that would match "Nyan", "NyanNyanNyan" or "Nyan Nyan Nyan" (skips spaces).
Lets say you wanted to match some words, but people like to create variations of that word that dont get caught by the filter. If you wanted to match "Fuck" but people keep tying "Fck" on purpose, instead of creating two rules, you could try "F(u)+ck", which would match the words "fuck", and "fuuuuuck" but not "fck", so your option would be to use *, which matches the previous character/token 0 or more times, and it is a greedy match, so it will try to match as many as possible. So doing "F(u)*ck" would match all three "fuck", "fuuuuuck", "fck".
Sometimes it is better to use + instead of * because there are some words that you don't want to match. Also using word boundaries can be helpful, like to match "ass" but not "glass", you could do \bass\b which would only match that specific word.
Like to match "fk" (extremely shortened version of fuck) but not "afk", it is simply \bfk\b. To catch either "fck" or "fk", but not "afk", \bf(c)*k\b. These dont catch spaces though, like in "f u c k", but you could try using "\b(f)+(u|\s)*(c|\s)*(k)*\b" which would match all of these: "fk" "fck" "fuck" "f k" "f c k" "f u c k" "fffuuucccckkk" "ffuuuuuuuu" "fff uuuuuu cc kk" but wont match "d u c k" (or variations not starting with an F), and also wont match "afk". Notice that \s is space, which can also be the equivalent of [ ] like you said in your post.
\w Matches any word character (alphanumeric & underscore). \W Matches any character that is not a word character (alphanumeric & underscore). \d Matches any digit character (0-9). \D Matches any character that is not a digit character (0-9).
The rule
Still spits out the command in the chat window.