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 May 26, 2013Why do none of these rules actually take affect? I'm using essentials chat, http://pastebin.com/Fb87YKgX
-
View User Profile
-
Send Message
Posted May 25, 2013Hi, I've been bit lazy and haven't upgraded in a long time (still on v2.3.5), so I'm trying the 3.0.1 snapshot and I have two issues:
Thanks :)
-
View User Profile
-
Send Message
Posted May 24, 2013@IndigoParadox
Using ^ in [square-brackets], makes ^ mean "NOT". So anything that is NOT (^) a Digit (0-9) or a Letter (a-z) will be caught. The * means 0 or more times, greedy match, so it will try to match as many as it can before it hits the next letter in the rule. If anyone has a better way to do it, let us know :p
-
View User Profile
-
Send Message
Posted May 24, 2013@ihasTechno
I think this is probably related to a bug with asynchronous calls. Do you get tracebacks in your serverlog?
-Sage
-
View User Profile
-
Send Message
Posted May 24, 2013Even with the slight errors this plugin is one of the greatest I've ever used. It's extremely, nearly endlessly resourceful.
One thing; I need to stop players from saying a word regardless of the spaces or characters they use in between the letters. e.g. i want them to stop saying stuff. And I have that set up. But then they do s t uff. or eg s-t-u-f-f.
Or even S t-u f- *f.
Is there a way to stop this as well? I'm new to regex so excuse my lack of knowledge and/or professionalism.
-
View User Profile
-
Send Message
Posted May 24, 2013@Sage905
Ok. Great.
-
View User Profile
-
Send Message
Posted May 24, 2013Kicking, and Banning not working. Is it because I am using spigot? Or possibly bungee?
-
View User Profile
-
Send Message
Posted May 24, 2013@mrchasez
Ah... I see what's happening now. You are right, this is a bug. It's not the colors that I'm not implementing correctly, though, it's the formatting codes. I'm only allowing the text to have a color _or_ a formatting code, not both. So the formatting code is clobbering the color.
I should be able to code up a test/fix for this today. I will include it in the 3.0.1 release.
-Sage
-
View User Profile
-
Send Message
Posted May 23, 2013@Sage905
Decolor is false. Also your picture is wrong. In your picture everything is green but member when certain parts should be red (&c). I did some testing. I downgraded to version v2.4.2 and colors work perfectly! Proving this is an issue with THIS plugin. Please fix it! We loved that feature.
-
View User Profile
-
Send Message
Posted May 23, 2013@Sage905
Thanks I will do, I too am using Spigot, had a crash few days ago but didnt think it was related and didnt save the crash report.
-
View User Profile
-
Send Message
Posted May 23, 2013@austindkelly
Try this snapshot build: PwnFilter-3.0.1-SNAPSHOT
It should resolve this issue. I will be releasing a 3.0.1 sometime tomorrow with this bug fix.
-Sage
-
View User Profile
-
Send Message
Posted May 23, 2013@CVision:
Okay... I had a chat with a couple of people in #spigot. Basically, they think that the problem is a runaway regular expression. So one of your match statements, combined with a particular message is backtracking so much that it's hanging your server.
Refer to: Runaway Regex for details.
If you want, you can pastebin your rules.txt and I'll try to have a look to see if any of the rules jump out at me as being problematic. (PM me the URL, if you are concerned about it being public).
-Sage
-
View User Profile
-
Send Message
Posted May 23, 2013I keep getting async errors on warnings not sure whats going on -=- http://pastebin.com/18FfezSQ
EDIT: I read back at some discussion and Im going to try a link posted to a dev version since I do not see a link to your dev repo.
-
View User Profile
-
Send Message
Posted May 23, 2013@mrchasez
I just tested your rule on my development server, and it looks okay.
So PwnFilter is working correctly. Perhaps you have another plugin which is de-coloring the message after PwnFilter? (BTW, I did that test with 3.0.0)
If the re-write is working, but the colors have been stripped, I would guess that you either have decolor: true in your PwnFilter config.yml, or another plugin is stripping the color from the message after PwnFilter has processed it. You might want to double-check the priority that PwnFilter is being registered at. It should show up in the console log and/or your pwnfilter.log
-
View User Profile
-
Send Message
Posted May 23, 2013@Sage905
I have this setup so when my staff type -member in chat they display a custom message for members to "Vote" which has color. They normally can't use color in chat.
Example:
match -+m+e+m+b+e+r
require permission website.command
then rewrite &9&l![MEMBERS]!:&r &aPlease &c&l/VOTE&r&a to get &9&l4 DIAMONDS&r&a /VOTE!
It's hard to see but the message ends up looking good with color and boldness. However now the line just comes out plain white.
-
View User Profile
-
Send Message
Posted May 23, 2013@CVision
Hi,
I'm going to have to ask you to report this to the SpigotMC team. I see that there are PwnFilter calls here, but there are also other plugins as well. It seems plausible that there's something wrong with PwnFilter, but:
If the Spigot team can help verify that this is really caused by PwnFilter, then I'm willing to make changes to the code to fix it. At the moment, though, I just don't have any idea what the problem could be.
Thanks, -Sage
-
View User Profile
-
Send Message
Posted May 23, 2013I tested build 3.0 for the last three days with spigot and it works fine, but today server crashed again. http://pastebin.com/2jJKLFVp
Hopefully you find a solution for this problem, because it is a really nice plugin.
-
View User Profile
-
Send Message
Posted May 23, 2013@itsatacoshop247
This is a high-priority item. As DreamPhreak mentioned, it's already partly implemented in code, but I had some issues with Bukkit anvil support. There's a PR on the bukkit code that I need, but I'm trying to find a workaround, because it could be weeks before that gets released.
I'll post an update to the Development Forum when I have a snapshot ready for testing: http://dev.bukkit.org/server-mods/pwnfilter/forum/pwnfilter-dev/53016-3-1-planned-features
-
View User Profile
-
Send Message
Posted May 23, 2013@mrchasez
I totally refactored how we handle strings with color in them. Now, we store the plaintext and colors separately. So I can see how this would break your filter if you were actually trying to match on colors.
The reason I split the string like this is so that:
In your case, though, this creates an issue where you are actually -trying- to use the filter to do stuff with color codes.
Maybe you could post an example of the relevant rules.txt section that you're trying to use? There was a difference between "then replace" and "then rewrite" that I didn't fully grasp when I started implementing this new support for colors. Maybe I didn't implement them correctly. Or maybe the problem is that match no longer matches color codes, so I have to create a new matchcolor tag or something. Seeing your rules will help a lot.
-Sage
-
View User Profile
-
Send Message
Posted May 23, 2013@IndigoParadox
That comment really helped! :) I think I found the reason why these tracebacks were being thrown. I have posted a snapshot build of 3.0.1 here: http://ci.toal.ca/repo/snapshots/com/pwn9/PwnFilter/PwnFilter/3.0.1-SNAPSHOT/PwnFilter-3.0.1-20130523.122820-1.jar
Can you try it for a few days and let me know if you see the issue again? I think this should kill it for good.
-Sage