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 Jun 25, 2013@Masterhax
check forum, there are many useful hints. for matching word with (or without) spaces just put spaces and quantifier between letters:
match w *o *r *d
for match word with dots, commas and other characters put non letter characters matching and quantifier between letters:
match w(\W|_)*o(\W|_)*r(\W|_)*d
(you have to match \W or _ because \W match everything except letters and _)
-
View User Profile
-
Send Message
Posted Jun 24, 2013Hi, love your plugin, but my friends often just use s p a c i n g when swearing... Is there any way to block this?
-
View User Profile
-
Send Message
Posted Jun 23, 2013@Sage905
it only seems to happen like right after a startup or during a worldedit lag spike. also the repeat message spam blocker is definitely not working, there is no error in console but repeated messages are not blocked on any of my server when they used to be before the plugin got updated
-
View User Profile
-
Send Message
Posted Jun 22, 2013@nejcneo A whitelist -allows- commands to bypass all checks, you might not want that. As for the other spam, check the Regex discussion forum, this one has been answered about 50 times.
-
View User Profile
-
Send Message
Posted Jun 22, 2013I tried to put in Command whitelist "-msg, -tell" (that should block spamming for msg and tell commands. And players can still type msg 3x in a row. How is this possible? If this is not what plugin provides is possible to add that function to Remove spam from specific commands. And Anti-Spam doesn't really protect spamming. Player can still say "hey", "hey2", "hey", "hey2" And that way is still allowed to spam. Is there any configs for that?
-
View User Profile
-
Send Message
Posted Jun 22, 2013@Sage905
Thank you, and I hadn't even known of the existence of lookarounds. Thanks for pointing that out!
As for the $1, what you stated is EXACTLY what I am looking to do. That alongside a few other possibilities such as when I block a user from blurting their password out loud, it will read back to them what they typed into chat.
-
View User Profile
-
Send Message
Posted Jun 22, 2013@x_clucky
I don't think that "ignore string" was ever designed to be a regex on its own. Nor do I think it makes sense to enforce that the strings in it check word boundaries. I'll have to think about this, and talk it over with tremor.
In the meantime, you -could- achieve what you're looking for through negative lookbehind. Example:
This bit of code: (?<!STUFF>)foo will match "foo" in the string, but only if it is -not- preceeded by STUFF. (Note that STUFF doesn't become part of the match)
There are also positive lookbehinds as well as positive and negitive lookforwards. You can learn more about this here: http://www.regular-expressions.info/lookaround.html
I agree that it doesn't "read" as easily as "ignore string", but it's also more powerful.
As to the question of group replacements, that is something that was made more challenging to do once I implemented the ability to preserve color/formatting in the strings. It's not impossible, though. I can see the power of being able to do:
<<code>>match (\w+(?<!\bbr|\bs|\bcr|\bcl)(a+(\W|\d|_)*s+(\W|\d|_)*s+))\b then warn Don't say $1I've noted it as a feature enhancement request.
-
View User Profile
-
Send Message
Posted Jun 22, 2013@PhanaticD
Thanks. My best guess at this point is that the traceback was caused by a "Cache miss". Perhaps the player had just recently logged on and hadn't been updated in the data cache.
Does this happen a lot? If so, then I have to dig deeper. If it's a one-off occurrence, I think my most recent build should prevent it from happening in the future.
-Sage
-
View User Profile
-
Send Message
Posted Jun 22, 2013@x_clucky
That actually looks like to be perhaps a pwnfilter bug.. I see what you mean.
-
View User Profile
-
Send Message
Posted Jun 21, 2013@Sage905
the person had said LAG LAG LAG LAG when i have these rules
match (\p{Lu}|\s){6,120} then lower-
View User Profile
-
Send Message
Posted Jun 21, 2013@PhanaticD
That definitely looks like a bug.. Can you send me a copy of the rule? It looks like the rule was trying to replace one of the variables &world, etc...
I think I'll just put a ternary operator in there, to check that there's data before the replace, but it would help to know how it was breaking.
Thanks, Sage
-
View User Profile
-
Send Message
Posted Jun 21, 2013got a null pointer error: http://pastebin.com/Z2FST1re
-
View User Profile
-
Send Message
Posted Jun 21, 2013This does not seem to be working as people send duplicate messages
-
View User Profile
-
Send Message
Posted Jun 21, 2013@EpicATrain
That's what I'm saying though... You shouldn't have to censor the same word twice in order to ignore part of the word. It needs to not count the "string" if there is a symbol/letter before or after it...
-
View User Profile
-
Send Message
Posted Jun 21, 2013@x_clucky
Why not make a completely different filter for that? Let's do it now...
match \b(d+(\W|\d|_)*u+(\W|\d|_)*m+(\W|\d|_)*b+(\W|\d|_)*a+(\W|\d|_)*s+(\W|\d|_)*)\b
I wrote that off the top of my head and I haven't tested it.
Sorry I've been away for so long. I need to work with Sage and find out what all he's done so I can change my filter accordingly.
-
View User Profile
-
Send Message
Posted Jun 21, 2013hey
I love the the new fine feature, swearing will be expensive :D
tho one question, how can i kick someone who has no money?
if i do "then fine 500 Language plz, 500 fine for swearing!" but if the player only have say 200 .. how can kick that player then?
extract from logfiles:
cheers sirmyllox
-
View User Profile
-
Send Message
Posted Jun 20, 2013Without censoring dumbass on the line above this, there is no way that this will catch dumbass being that "bass" is in the word dumbass. Is there a way you could check to see if there are line breaks before and after bass?...
Also, why is $1, $2, $3 etc. not supported, along with [^ab^c]? The [^ab^c] thing could entirely replace "ignore string" if it were added in... couldn't it?
-
View User Profile
-
Send Message
Posted Jun 20, 2013@PhanaticD
The traceback you posted very clearly states 3.0.1: http://pastebin.com/x67nVWKt "Could not pass event AsyncPlayerChatEvent to PwnFilter v3.0.1"
Was this the correct traceback?
@EncryptedCurse
Tremor77 is still around, but he foolishly let me work on the code and now I've gotten rather carried away. :) He has expressed some displeasure at the learning curve I have created. :P
@cuddyier
in config.yml: signfilter: false
Or, by individually disabling a rule for signs:
-Sage
-
View User Profile
-
Send Message
Posted Jun 20, 2013@Sage905
I was using 3.1.0 rc2 at the time
-
View User Profile
-
Send Message
Posted Jun 20, 2013How do I disable pwnfilter checking signs?