AntiAdvertising
Don't you hate these people joining your server, spamming their server's ip?
This plugin will bring an end to this.
It searches the chat messages (and specified commands) for server addresses like 111.111.111.111:12345 or server.domain.com. The plugin will then check if this message really points to a minecraft server (by pinging it) and in this case can:
CI-Server
If you want to support the development of this plugin, you can donate by clicking the button on the top right corner.
Thanks to Absolutionmc for donating.
This plugin will bring an end to this.
It searches the chat messages (and specified commands) for server addresses like 111.111.111.111:12345 or server.domain.com. The plugin will then check if this message really points to a minecraft server (by pinging it) and in this case can:
- drop the message
- censor the message (replace the advertisement by ***)
- kick the player
- broadcast a message
- notify moderators of the advertising
- execute a custom command
Frequently asked questions
Commands
- /antiadreload
-
Reloads the plugin configuration.
Permission: antiad.reload
- /serverping
-
Pings a server manually.
Permission: antiad.ping
Permissions
- antiad.notify
-
Permission to receive notifications about server advertisement.
- antiad.reload
-
Permissions to reload the configuration of the plugin.
- antiad.ignore
-
Permission to send chat messages without being checked.
- antiad.ping
-
Permissions to ping potential servers manually.
config.yml
Click the heading ;-)
Development builds
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-Server
If you want to support the development of this plugin, you can donate by clicking the button on the top right corner.
Thanks to Absolutionmc for donating.
-
View User Profile
-
Send Message
Posted Apr 13, 2013@Absolutionmc
A new version is waiting for approval.
If you need the new version now, you can download it from the CI server specified in the description.
EDIT: Have you considered giving free cookies to the angry players?
Often worked for me ;-)
-
View User Profile
-
Send Message
Posted Apr 13, 2013Thanks man, I didn't restart in 24 hours so yeah, right now i'm being attacked by angry players haha. Hope to see the fix soon :P
-
View User Profile
-
Send Message
Posted Apr 13, 2013@Absolutionmc
I guess this happened when somebody mentioned the same hostname in a short period of time twice... Sorry about that, I didn't think the process of resending through completely... I think my latest fix should correct this, I'll put it up as soon as possible, meanwhile, I'll include a link to my CI server in the description, so you can get an updated version fast.
@Apple_columb
Was that a question? If so, the answer is: Yes, you can do that, so when somebody mentions this server in the chat, no actions will be performed
-
View User Profile
-
Send Message
Posted Apr 13, 2013Whitelist servers?
-
View User Profile
-
Send Message
Posted Apr 13, 2013Got an exception upsj.. After this my server crashed..
2013-04-13 15:56:33 [WARNING] [AntiAdvertising] Task #40 for AntiAdvertising v2.0 generated an exception
java.util.ConcurrentModificationException
at java.util.HashMap$HashIterator.nextEntry(HashMap.java:839)
at java.util.HashMap$KeyIterator.next(HashMap.java:874)
at de.upsj.bukkit.advertising.ActionHandler.run(ActionHandler.java:54)
at org.bukkit.craftbukkit.v1_5_R2.scheduler.CraftTask.run(CraftTask.java:58)
at org.bukkit.craftbukkit.v1_5_R2.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:344)
at net.minecraft.server.v1_5_R2.MinecraftServer.r(MinecraftServer.java:508)
at net.minecraft.server.v1_5_R2.DedicatedServer.r(DedicatedServer.java:229)
at net.minecraft.server.v1_5_R2.MinecraftServer.q(MinecraftServer.java:471)
at net.minecraft.server.v1_5_R2.MinecraftServer.run(MinecraftServer.java:403)
at net.minecraft.server.v1_5_R2.ThreadServerApplication.run(SourceFile:573)
2013-04-13 15:56:33 [WARNING] [AntiAdvertising] Task #40 for AntiAdvertising v2.0 generated an exception
java.util.ConcurrentModificationException
at java.util.HashMap$HashIterator.nextEntry(HashMap.java:839)
at java.util.HashMap$KeyIterator.next(HashMap.java:874)
at de.upsj.bukkit.advertising.ActionHandler.run(ActionHandler.java:54)
at org.bukkit.craftbukkit.v1_5_R2.scheduler.CraftTask.run(CraftTask.java:58)
at org.bukkit.craftbukkit.v1_5_R2.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:344)
at net.minecraft.server.v1_5_R2.MinecraftServer.r(MinecraftServer.java:508)
at net.minecraft.server.v1_5_R2.DedicatedServer.r(DedicatedServer.java:229)
at net.minecraft.server.v1_5_R2.MinecraftServer.q(MinecraftServer.java:471)
at net.minecraft.server.v1_5_R2.MinecraftServer.run(MinecraftServer.java:403)
at net.minecraft.server.v1_5_R2.ThreadServerApplication.run(SourceFile:573)
2013-04-13 15:56:35 [WARNING] [AntiAdvertising] Task #40 for AntiAdvertising v2.0 generated an exception
java.util.ConcurrentModificationException
at java.util.HashMap$HashIterator.nextEntry(HashMap.java:839)
at java.util.HashMap$KeyIterator.next(HashMap.java:874)
at de.upsj.bukkit.advertising.ActionHandler.run(ActionHandler.java:54)
at org.bukkit.craftbukkit.v1_5_R2.scheduler.CraftTask.run(CraftTask.java:58)
at org.bukkit.craftbukkit.v1_5_R2.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:344)
at net.minecraft.server.v1_5_R2.MinecraftServer.r(MinecraftServer.java:508)
at net.minecraft.server.v1_5_R2.DedicatedServer.r(DedicatedServer.java:229)
at net.minecraft.server.v1_5_R2.MinecraftServer.q(MinecraftServer.java:471)
at net.minecraft.server.v1_5_R2.MinecraftServer.run(MinecraftServer.java:403)
at net.minecraft.server.v1_5_R2.ThreadServerApplication.run(SourceFile:573)
2013-04-13 15:56:36 [WARNING] [AntiAdvertising] Task #40 for AntiAdvertising v2.0 generated an exception
java.util.ConcurrentModificationException
at java.util.HashMap$HashIterator.nextEntry(HashMap.java:839)
at java.util.HashMap$KeyIterator.next(HashMap.java:874)
at de.upsj.bukkit.advertising.ActionHandler.run(ActionHandler.java:54)
at org.bukkit.craftbukkit.v1_5_R2.scheduler.CraftTask.run(CraftTask.java:58)
at org.bukkit.craftbukkit.v1_5_R2.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:344)
at net.minecraft.server.v1_5_R2.MinecraftServer.r(MinecraftServer.java:508)
at net.minecraft.server.v1_5_R2.DedicatedServer.r(DedicatedServer.java:229)
at net.minecraft.server.v1_5_R2.MinecraftServer.q(MinecraftServer.java:471)
at net.minecraft.server.v1_5_R2.MinecraftServer.run(MinecraftServer.java:403)
at net.minecraft.server.v1_5_R2.ThreadServerApplication.run(SourceFile:573)
-
View User Profile
-
Send Message
Posted Apr 12, 2013@_Mahagon
Oops :-D Will be fixed in the next version.
-
View User Profile
-
Send Message
Posted Apr 12, 2013%ADDRESS% variable is missing since 2.0 D:
-
View User Profile
-
Send Message
Posted Apr 12, 2013@Hulipill
That's not exactly how it works, as 8.8.8.8 is a DNS server run by google (AFAIK), it won't be treated as advertisement.
Replacing by a configurable text rather than by * characters isn't implemented yet, but that's only a small change to do ;-)
I haven't tested the plugin with 1.5.1, but since there are no major changes concerning the chat and plugin handling, it should work just fine :-)
-
View User Profile
-
Send Message
Posted Apr 11, 2013Haha! Sure will try this! ! I'll put when someone says "Hey Join This Server NOW! 8.8.8.8 <<<
- FREE OP!!! To say "Hey Join This Server NOW! play.stupidserver.com <<<- FREE OP!!! BTW Does this work with 1.5.1???-
View User Profile
-
Send Message
Posted Apr 10, 2013@Absolutionmc
Thanks a lot :-) It's always good to hear from people who appreciate my work.
-
View User Profile
-
Send Message
Posted Apr 9, 2013Just donated $15.. Keep up the good and original work upsj. I'm impressed with this plugin
-
View User Profile
-
Send Message
Posted Apr 9, 2013@Nickshelton80
Yep, sorry about that but the author of TownyChat has to make a small change to his plugin as well as it doesn't distinguish between cancelled chat messages (that won't be sent) and chat messages that will be sent. I've already sent a Pull Request to his github code base, hoping he will merge it
You should stick to using the old 2.0 version as I had misinterpreted the execution order based on the listener priorities, so the fix in TownyChat should suffice at least for normal chat messages. I can't guarantee this for commands as the developer set the listener priority for his command event to LOWEST, which I can't undercut. The execution order will then depend on the order the plugins are loaded in, which I can't influence...
Therefore I removed the newer build (also to keep the version numbers going) ;-)
-
View User Profile
-
Send Message
Posted Apr 9, 2013It still happens on both version 2.0's in the link's to the right.
-
View User Profile
-
Send Message
Posted Apr 9, 2013Woah that was really fast, Thank you for fixing that so quickly!
-
View User Profile
-
Send Message
Posted Apr 9, 2013Awesome! The plugin really is original.. All other anti advertising plugins just match the regex and block, blocking google lol.. But this is genius, i'll donate to you tonight after I run some tests. Thanks for this plugin upsj
-
View User Profile
-
Send Message
Posted Apr 9, 2013@Absolutionmc
Yes it does, but only if there is a minecraft server running at that address (additional port information like address:port is read too)
-
View User Profile
-
Send Message
Posted Apr 9, 2013I'll run some tests with it tonight :P
Does it block domains and execute custom commands like ban?
-
View User Profile
-
Send Message
Posted Apr 9, 2013@Nickshelton80
Oh, I didn't think of that issue :-D The low priority of the chat listener of my plugin makes the towny plugin think the same message has been sent twice in a short period of time, even though the first message has been cancelled...
The problem here is that the TownyChat plugin uses the priority 'high' to check the chat and assumes that the message won't be blocked by other plugins. Therefore a message that is first blocked but later resent is considered spam...
EDIT: I see that I've been looking through an older version of the source code of TownyChat, in the current version, the listener has low priority. I'll change the priority of my chat listener and with a small change I suggested to the author of Towny, that problem should be solved ;-)
@lst96
That behaviour is intended.
How should the plugin be able to distinguish between a 'legitimate address' like google.com, youtube.com, minecraft.net and a server that is currently not running, like example.no-ip.org? (Actually, when looking through some old chat logs, I found about as much server advertising as mentions of minecraft.net, e.g. when the login didn't work for some people due to downtime)
As I wrote in the plugin description, only addresses of running minecraft servers will cause measures against the player.
-
View User Profile
-
Send Message
Posted Apr 8, 2013i would definitely use this plugin, but since it cant block offline servers or domains like example.no-ip.org then it offers nothing different from the plugin I currently use.
-
View User Profile
-
Send Message
Posted Apr 8, 2013noticed a little problem.
if a server happens to be offline when someone advertises it, the msg will go through. I also noticed like for my server for ex if you do example.no-ip.org it do this in chat example no-ip org