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
-
View User Profile
-
Send Message
Posted Feb 8, 2014@mipro You told it not to fix the ř if there's a regular letter before or after it. In your example of "řekni", it sees the "ře". Since the "e" is a regular letter, it doesn't fix the ř.
If you want it to always replace ř with r, use:
-
View User Profile
-
Send Message
Posted Feb 8, 2014Good day,
I would like to forbid player's punctuation on my server via pwnfilter plugin.
But when I reloaded the plugin I realized it would ban only the letter "ř" and not ř in the word "řekni" and I'd like that when someone writes the word "řekni", the word "rekni" will appear in chat.
It's supposed to prevent usage of blocked words.
Thanks for any help or advice.
chat.txt :
match (?<!'|\w)(á|A|Á)(?!\w)
then rewrite a
then log
match (?<!'|\w)(B)(?!\w)
then rewrite b
then log
match (?<!'|\w)(č|C|Č)(?!\w)
then rewrite c
then log
match (?<!'|\w)(ď|D|Ď)(?!\w)
then rewrite d
then log
match (?<!'|\w)(E|é|É)(?!\w)
then rewrite e
then log
match (?<!'|\w)(F)(?!\w)
then rewrite f
then log
match (?<!'|\w)(G)(?!\w)
then rewrite g
then log
match (?<!'|\w)(H)(?!\w)
then rewrite h
then log
match (?<!'|\w)(CH|cH|Ch)(?!\w)
then rewrite ch
then log
match (?<!'|\w)(I|Í|í)(?!\w)
then rewrite i
then log
match (?<!'|\w)(J)(?!\w)
then rewrite j
then log
match (?<!'|\w)(K)(?!\w)
then rewrite k
then log
match (?<!'|\w)(L)(?!\w)
then rewrite l
then log
match (?<!'|\w)(M)(?!\w)
then rewrite m
then log
match (?<!'|\w)(N)(?!\w)
then rewrite n
then log
match (?<!'|\w)(O|Ó|ó)(?!\w)
then rewrite o
then log
match (?<!'|\w)(P)(?!\w)
then rewrite p
then log
match (?<!'|\w)(Q)(?!\w)
then rewrite Q
then log
match (?<!'|\w)(R|ř|Ř)(?!\w)
then rewrite r
then log
match (?<!'|\w)(š|S|Š)(?!\w)
then rewrite s
then log
match (?<!'|\w)(T|ť|Ť)(?!\w)
then rewrite t
then log
match (?<!'|\w)(U|Ú|ú|ů|Ů)(?!\w)
then rewrite u
then log
match (?<!'|\w)(V)(?!\w)
then rewrite v
then log
match (?<!'|\w)(W)(?!\w)
then rewrite w
then log
match (?<!'|\w)(X)(?!\w)
then rewrite x
then log
match (?<!'|\w)(Y|Ý|ý)(?!\w)
then rewrite y
then log
match (?<!'|\w)(Z|Ž|ž)(?!\w)
then rewrite z
then log
-
View User Profile
-
Send Message
Posted Feb 8, 2014When I use "then points #" in a function(filter) it prints an empty line in the chat to the person who the point is being added to. For expample:
prints an empty line in chat. However if I replace "then points 1" with "then points 1 NoPe" it prints NoPe instead of an empty line.
My question is: how do I make it so it does not print anything in the chat at all ? Or should I make a ticket for that ?
I am sure the empty line is because of the "points" action, because if I remove it (the action) the empty line does not appear in the chat.
-
View User Profile
-
Send Message
Posted Feb 6, 2014Howdy. I love this plugin to death, but I have a question about a command. Normally, users can type /nick blahblahblah to give themselves a really long, obscene nickname. Would it be possible to limit the length of the nickname to, say 6 characters? And force it to only be one color?
-
View User Profile
-
Send Message
Posted Feb 5, 2014Is there any way to make the rewrite in text colored? Such as If I was to swear it would be match (swearword) then rewrite &4(swearword)&f
This would include the swearword but I would just want it colored.
-
View User Profile
-
Send Message
Posted Jan 30, 2014@Sage905
Awesome! Thank you for the detailed response.
-
View User Profile
-
Send Message
Posted Jan 26, 2014Hey, i have problem with pwnfilter AntiAdvertising. People can advertise like this: mc. domain. com. How to solve this? Here is my rule:
-
View User Profile
-
Send Message
Posted Jan 23, 2014@matagin
Chat is handled Asynchronously, and filtering chat should not cause server lag. If you're performing actions based on chat, PwnFilter queues a task into the main thread, but unless you're doing something cpu intensive in your rules, there shouldn't be a problem.
In older versions of PwnFilter, chat could sometimes "hang", if there was a rule which had a "runaway regex". Basically, this is a match statement that causes the regex engine to get stuck in a deep loop looking for a match. This can temporarily drive CPU usage extremely high, and cause Spigot to crash, with a detailed error log that points to PwnFilter. In this case though, it's the rule, and not PwnFilter itself, that is causing the problem.
In newer versions of PwnFilter (from about 3.2, I think), there is a "timeout" on regex processing that will abort trying to match if it gets stuck for more than 1s. (In 3.4, this will be reduced to 100ms). When this happens, there will be a log entry that tells you what rule got stuck, and what the chat message was that triggered the runaway.
PwnFilter is designed to be efficient and not lag the server, even with massive rules files, like EpicATrains language filter. If you find otherwise, please file a ticket, because we want to know.
-Sage
-
View User Profile
-
Send Message
Posted Jan 23, 2014Is it possible that Pwnfilter would cause server lag/tps drop due to it analyzing and filtering so much chat? I have to data to back that up but I am just wondering. I believe chat was split out to a separate process a while back so maybe it's not an issue.
-
View User Profile
-
Send Message
Posted Jan 22, 2014@Sage905
I copies and pasted all my rules from my rules.txt to my chat.txt and there was no change. I also can't figure out where to download EpicATrain's chat filter, all I have installed is Pwnfilter. Do I need to install the chat filter as well? If I do, where do I download it?
-
View User Profile
-
Send Message
Posted Jan 21, 2014I would like it if the log could go into a backup folder after a certain size or length of time.
-
View User Profile
-
Send Message
Posted Jan 21, 2014@DilloDolphins
If you want to filter just the chat messages, then I would put the rules directly into chat.txt. If you want to use a rule for more than one filter (eg: chat, sign, item, etc), I would put it in the rules.txt, and then make sure that each of the main filter files has a line that says: include rules.txt
-Sage
-
View User Profile
-
Send Message
Posted Jan 21, 2014Ok I would really like to use this plugin because it looks really good but I have one problem: I can't figure out how to get the rules to work. In my main rules file I put this:
match shit then replace poo then points 2 then kick No Swearing! then log
When tested, it completely failed. Didn't block it at all or even appear to take notice. What am I doing wrong? Do I need to put this in the chat.txt as well? I would like to know what's up.
-
View User Profile
-
Send Message
Posted Jan 19, 2014I have tried to make rules that work for no advertising I have some if you want them they aren't perfect but they will do for now till they make better ones dropbox file. Just add them to your rules.
-> https://www.dropbox.com/sh/khiz9otr8mktt69/OZNShmmntS-
View User Profile
-
Send Message
Posted Jan 10, 2014Thanks for the awesome plugin! I like that chat clearing feature that you added, however can you add a feature that only clears my chat. Some of the players get bugged when I constantly clear the chat. If the plugin already has please tell me :D
-
View User Profile
-
Send Message
Posted Jan 10, 2014@vinzenco
I had a quick look at the code that caches player data, and I can't figure out how a player could be online that we don't know about. Can you give me a list of other plugins you're using? I think that one of them might be letting players connect to your server without calling the PlayerJoinEvent.
(edit) I made a change to our caching code to prevent this from triggering a warning, and also to auto-add players to the cache, if we don't detect them during login. This is in our latest development build: http://ci.toal.ca/job/PwnFilterDevelopment/63 NOTE: Development builds are used "at own risk". They have not been scanned by the bukkit team.
-Sage
-
View User Profile
-
Send Message
Posted Jan 10, 2014@vinzenco
Hi,
It is very strange that you are seeing that warning. It indicates that the information we are caching about online players is not matching who's online.
Do you have a large server, and/or have players disconnecting / reconnecting frequently?
I will have a look at the code and see if I can figure out what might be causing the warning to show up.
-Sage
-
View User Profile
-
Send Message
Posted Jan 10, 2014I become all 1-3 sec this warning -> [Server thread/WARN]: [PwnFilter] Cached Player List is not equal to actual online player list! Someone have a idea what can i do ? :(
-
View User Profile
-
Send Message
Posted Jan 9, 2014@Bombing56
Did you create a filter to filter out the said word?
The default install only has like 3 example filters added to the chat.txt file.
-
View User Profile
-
Send Message
Posted Jan 7, 2014@Mcraftpete i did i made sure i was on the default group and i wasnt op but i could still swear