AntiAdvertiser
AntiAdvertiser makes sure advertisers can't steal your hard-earned players. It checks all chat messages, commands, signs and books for any type of IP addresses and domain names and gets rid of all messages that are found to be ads.
How it works
AntiAdvertiser listens to chat, commands, sign change and book drop events and runs some code. If the chat message, command, contents of the sign or contents of the book contain something detected as an IP address or domain name, the event is cancelled, staff members are notified. You may also run a custom command (mute or ban) or kick the player when they attempt to advertise.
Features
- Reject messages (or commands or signs or books) in real time, before they can be seen by other players. Without this plugin, players still see the ad even if you kicked the advertiser.
- Log all detections to a file
- Show the message that was rejected to staff so they can judge if it's against the rules or not.
- Execute a command on detection to mute/ban/whatever you desire the player upon advertising.
- API so other plugins can decide whether something is advertising or not as well!
- Custom blacklists and whitelists that can include regular expressions
- Disable any part of the plugin
Why AntiAdvertiser?
As a server administrator, you most likely want to protect your server from advertisers. There have been plenty of anti-advertising plugins popping up on Bukkit Dev lately, so why should you choose AntiAdvertiser?
AntiAdvertiser is configurable. You can define words that shouldn't be seen as advertising, you can create custom filters that can be as sensitive as you'd like them to be, you can disable any check. AntiAdvertiser tracks more actions than any other anti-advertising plugin.
AntiAdvertiser is the most up to date. There are two ways of detecting a domain name: A general regex (which detects any messages that contain a period, such as "Ender.man") or a list of TLDs. Most other anti-advertising plugins use the latter - the author defined a list of a few domain names (but most certainly not all) - AntiAdvertiser, on the other hand, uses a very recent list of top level domains obtained from the Internet Assigned Names Authority (the guys that are in charge of domain names on the internet). Version 1.1 will even add automatic filter updating (which will be completely optional) to make sure advertisers can't bypass the filters by using a recently added domain name.
Custom Filters
One of the great things about AntiAdvertiser is the customizability! You're able to define custom filters - we even have a few examples for you so you can easily also block the "clever" advertisers that replace the dots with spaces, for example.
More information on custom filters...
Plugin Conflicts
AntiAdvertiser should play well with most plugins, however if you have EssentialsChat installed, you need to give all players the following permission: essentials.chat.url - without it, Essentials automatically gets rid of the dots in messages.
Usage Data Collection
The plugin by default submits anonymous usage data to MCStats.org. The following information is collected and made publicly available in the form of graphs:
- Plugin version
- Server version (includes Minecraft version (1.7.9) and server software (CraftBukkit, Spigot))
- Number of online players
- Operating system information (name, version, architecture)
- Server information (country, number of CPU cores, Java version)
- The value of onDetect.action and whether you have a command in onDetect.command specified or not
You can opt out by editing /plugins/PluginMetrics/config.yml and setting opt-out to true.
Support
If you have any questions, simply leave a comment here on Bukkit Dev. If you've found a bug, please submit an issue report on GitHub (make sure the issue hasn't been reported yet).
@tuxokc
Version 1.1 will add a {TLD} variable for use in custom regexes. Right now you can set up a regex to block only certain TLDs. I'm hoping to upload version 1.1 in a few days.
The out-of-the-box filters will always only detect valid domain names ("google.com" but not "google..com"). For those who wish more strict filters, we have a page with some examples. I'll add a "double dot" and "*.tld" examples when I'm on my computer.
Trying this out!
It lets through such simple obfus as 'www.playhere..com', or 'www.playhere.come', or '96.97.98..99'
Have you considered reducng any string of dots to a single dot?
Then detecting things like '*.{TDL}*
Thanks for getting the update out!
Heads up: I've continued developing this plugin. I'll upload a new version in a couple of days. New GitHub repo with everything I've got so far: https://github.com/MrEinStain/AntiAdvertiser (if you don't want to wait, you can clone the repo and compile it yourself - the master branch should be stable but I haven't done much debugging).
Edit: Uploaded the new version. May take a few days for it to be approved.
Stopped to working with the latest spigot/craftbukkit
Doesn't work for my server, keeps refusing to load. But it worked for other servers with the same craftbukkit version as mine. Idk why.
@metalman488
Dont worry about people saying stuff like join TheSurvival.zapto.org (my server :P) but you can make the blacklist
- .com - .org - .net
etc
Feature Request: Hook into Essentials mail system to prevent players from mailing others to advertise their server.
hmm... a month later...
The only problem i has is it won't block server ip's that are domains. like randomserver.zapto.org. i have checked the config and i did tell it not to ignore domains.
@DeprecatedNether
Anyway that my server can use a Dev build? Would love to use something like this.
@zRA1Nz
The reason this is taking so long is that I usually put AntiAdvertiser on public servers I administrate (after making sure the owner is okay with using a development build of my plugin) and leave it there for a while to test if everything is working as meant to. That method is much easier than setting up a local server and connecting with two accounts to make sure everything works, but it does take a while longer.
As for your other comment, there's an "explicit whitelist" function added in 0.3, which is, as I mentioned above, still in the testing phase.
I'll hopefully be putting up an update within a week if nothing goes wrong on the "test" servers by then.
Also make it so if /unbanip is before it, it doesn't get blocked.
Damn been waiting for an update for a month now, did the author become inactive?
It would be nice if this could block test.com etc like play.server.net
Just wanted to say this is working well, looking forward to 0.3 so I can catch play.domain.com style people.
Thanks for notifying us.
@DeprecatedNether
When are you planning to release 0.3?
@levisn1
I'll add an explicit whitelist (ignore a message entirely if it contains something. Then you can just add "/command" to the whitelist and anything that contains "/command" will be ignored. The reason I'm not using this method already is: if a player said "12.34.56.78 is awesome but 87.65.43.21 is even more so" - assuming 12.34.56.78 is whitelisted, the message would be given an okay.
@MrREOM
Please refer to the change log for 0.2 about that:
0.3 will include better regexes (several to minimize false positives) but I need to thoroughly test it before releasing it. ;)
Some domains for some reason people can advertise but some they can't
Please add the option to whitelist the commands /login,register,change password..because some player uses a bad word as password xD...
Very nice plugin, im using it also as anti-swear plugin. :) please in the next update, add the possibility to edit the [TAG] for the chat messages. And if possible, add a simple caps block detector :)