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
@Adrenalineq
The current version works with R5.0 but I'll have an update built on 5 out by 8/1, trying to add a couple other features as well like bypass permission and maybe a config setting to set the chat listener priority. As of 1.5 Pwnfilter is on lowest priority to make it compatible with IChat, however I've found with some other chat plugins it works better on highest priority, so I want to let server admins decide how they want to use it.. just having trouble coding it, still a bit of a noob with JAVA.
Update to R5.0 Bukkit ? :P
@SuperSpyTX
A universal permission node like PwnFilter.bypass for admins and ops? That's a good idea, I can implement that in the next release. As it stands now you can use the ignore/require match rules with usernames or permission nodes per filter type... a little typing intensive i suppose if you create a lot of rules... consider universal bypass permission on queue.
@ProjectNarna - It should support EOL, a friend of mine made a filter to automatically add a (.) to the end of any sentences without punctuation... I'll review this, perhaps changes made in 1.5 did something. As far as /tell I could add this in without an API for other plugins since they all use the same bukkit hook for private messages and just create a config.yml with the option for filter-tells: true/false - this might be a bit farther down the road as I'm still learning JAVA lol :)
I would've kept this if there was a permission node to ignore certain players chat messages.
Hmm.. Doesn't seem to support $ (End-Of-Line). Is there some hidden characters (like \r\n) on the end of lines?
Also, It would be cool to have an API added to this so that /tell plugins could hook in and filter private messages also..
1.5 works perfectly, cheers mate.
@ProjectNarna
SimpleClans: chat-compatibility-mode: true - I have this set on my server as well and it doesn't cause any issues. Did you try v1.5? I'm going setup a test server later with iChat and experiment. If all else fails I'll contact the dev to see how i can add compatibility.
Forum: good idea, I'll look into that.
@tremor77
It might be SimpleClans in compatibility mode if you're familiar with that? It scans the text string for {clan} or something similar, and replaces it with the clan the player is in.
EDIT: Would it be worth having your Regex page converted to Bukkit's forum? Because it would improve the sharing aspect.
@ProjectNarna
I myself use SimpleClans and CraftIRC, there are no conflicts with those. I have a new build (version 1.5) in the pipe, in which I've changed the plugin event priority, in an attempt to fix any conflicts with mainline chat control plugins. It's fixed my issues with essentials.. so hopefully will do the same with iChat. If not I'll take a close look at iChat and hash out compatibility. Try out 1.5 once bukkit approves it. (Also making an update to the default rules.txt with some of the recent changes integrated)
http://pastie.org/4288184
iChat shouldn't intefere. SimpleClans *might* just because of it's replacing any occurrence of {clan}. But that's all I can think of.
EDIT: Could well be SimpleClans' {clan} replacement when used with iChat. When a user speaks in ClanChat, where the {clan} does not have to be replaced, because SimpleClans takes full control of the chat, replacements are made.
@ProjectNarna
Could you please use pastie.org and post a list of your plugins. As I mentioned in the Issues & Conflicts above - some "base chat" plugins that fool around with the default chat can interfere... I've already found the Essentials Plugin to interfere with the Dot. filter and chat colors, requiring the setting of permissions on the default player to shut off the essentials features.
Also, for debugging, add "then debug" at the end of a match statement as outlined on the Post Match Operators page. It will send some useful information to console when a match is made.
I have installed this plugin, removed my old Anti-Swear plugin, and installed this one. Using the default rules.txt, it doesn't filter anything. I also couldn't figure out how to use the "Simple but powerful configuration with built-in debugging. "
EDIT: "Fuq" shows a warning. But does not become fudge.
@Adrenalineq
I'm pretty sure going to Minecraft 1.3 wont be too much of a problem for this plugin, by now I'm guessing most of the chat and permissions related bukkit development is well set in stone and that It should build against the next RB pretty smoothly.
@tremor77
hehe, thx :-) i'll add this plugin when i upgrade my server to 1.3 ;)
@Adrenalineq
Once Bukkit approves version 1.4 your suggestion below will be in place. I also posted an example on the example regex page of how it works, under the IP filter.
ignore string <string1|string2|string3> - rule will ignore matches containing defined strings from a pipe separated list. v1.4
@flyingtacoz
"then kick" is a hardcoded part of PwnFilter, this plugin kicks the player when using "then kick".
A more powerful option for kicks, mutes, bans etc would be to switch to the "then console" option, and use your favorite banning plugin to execute the operation. "then console ban &player"
I considered adding an anti-spam element to PwnFilter but honestly I think multiline spam is best suited for another plugin. PwnFilter is really best geared toward performing matches per message.
How do I make it auto ban instead of auto kick? It doesn't work when I switch "then kick" to "then ban"
Maybe another idea to add to the rules, would be to somehow have some sort of anti spam thingy, like maybe you can't say the same sentence twice. So if you try to spam the chat saying
@Adrenalineq
I'm away for the weekend, when I return I'll work on adding "ignore string". Great suggestion thanks!
Also Version 1.3 is still pending bukkit approval which adds "ignore permission" and "require permission" to the rules, which will allow you to compare matches to a permission level. Plus a lot of other cool things, it's my first real major code revision so update when it comes out!
@tremor77
Very helpfull :) can you add "then allow" ? i want to block and allow few hostnames :)
@flyingtacoz
I'll post more and more examples as I work on this page, I also encourage our other users to contribute their examples on the regex examples page. Check there in a bit and I'll post sample rules for caps and repeating characters...
I'm also updating the plugin sometime 7/13 to check for bukkit color codes within words, so that players cannot evade the filter by typing in fu&5ck if they have permission to use chat color.