[ADMN/CHAT] AntiPub v0.3-REVIVAL - a plugin dedicated to blocking spam. [1.4.7-R1.0]

Discussion in 'Archived: Plugin Releases' started by Wolfy9247, Dec 30, 2011.

  1. Offline

    Wolfy9247

    [​IMG]


    Download & Other Information:
    Description:
    AntiPub is a light-weight, effective plugin dedicated to blocking un-wanted spam from your server's chat.

    Note: There's no way to prevent everything (yet); however, this should to block most of any issues that it is meant to. If you are having issues, please report the issue.

    Features:
    • Immediately detects and takes action towards any unapproved URL's or IP's.
    • Configurable exceptions to the built-in rules by command or manually in the config.yml.
    Permissions:
    • antipub.* - Wildcard; Gives all permissions.
    • antipub.admin - Synonymous to the wildcard permission.
    • antipub.mod - Gives some permissions, such as: bypass, notify, and help.
    • antipub.bypass - Bypass checks for IPv4 and domains being posted in the chat.
    • antipub.notify - Notifications of when a user is blocked, including Host/IP.
    • antipub.reload - Reloads the configuration.
    • antipub.toggle - Toggle values in the configuration.

    Permissions in v0.5+ (not currently available)
    • antipub.addx - Adds an exception in the configuration.
    • antipub.remx - Removes an exception in the configuration.
    • antipub.addf - Adds a filter in the configuration.
    • antipub.remf - Removes a filter in the configuration.

    How To Install:
    • Download the latest build of AntiPub at the top right of this page.
    • Place the downloaded *.jar into your server plugins folder.
    • Optional: Configure the produced config.yml file inside of plugins\AntiPub. Some of these values can be changed from in-game.

    [​IMG]

    Known Issues:

    Upcoming Plans:

    FAQ:
    • What happened to v0.3, and why has this new version taken so long?
    Answer: I'm most sincerely sorry about the delay in between then and now. There's been a multitude of things going on that has been keeping me from being able to devote time to the plugin. The v0.3-REVIVAL build will have optimized code and filter abilities; however, until v0.4 it will not have some additional features listed in the permissions. These features may still be available in the config.yml to be configured manually.
     
    sfxworks likes this.
  2. Offline

    Atomic Fusion

    The basic idea seems a little pointless to me (they can just not use periods, or something).
    Perhaps it's outside of your desired scope, but what about a more generalized anti-spam plugin, which uses Advanced Spam Filitering Technologies (TM)?
    Especially if there was something like reputation, whereby the longer someone was on the server, the less likely their messages would be to be identified as spam.
     
  3. Offline

    Wolfy9247

    Hm, that seems like a good idea, however it seems as if it'd take a bit more of my time than I currently have to create something of that sort. Also, I do agree that perhaps someone -could- post a string of numbers as the IP, but then again I could create a regex filter of some sort to sort through that and determine if it's an IPv4 address, but that also, in turn, would take more of my time. I'll see though, I'll see. :)
     
  4. Offline

    clavat

    Perfect, but you can add configure the advetising answer ?

    you can see on my bad english, i'm french... and my server too
     
  5. Offline

    Wolfy9247

    Oh, it's fine! So basically you're wanting a line in the configuration so you can specify the message that's displayed whenever someone's blocked from posting an IPv4 address?
     
  6. Offline

    clavat

    exactly :)
     
  7. Offline

    Wolfy9247

    I'll get that out later tonight when/if I have some time to add that into it. ^_^

    @clavat AP v0.2 is now uploaded, added both configuration for specifying the "block message" as well as URL detection (which is optional, set it to "false" within config.yml if you don't want it). Tell me if you experience any problems with it! :)
     
  8. Offline

    clavat

    thanks, very great Job !

    I do it now :D,
    With configuration :
    Block IPv4: true
    Block Domains: true
    Players can send domains same test.blabla.net, not normally !
    I have the plugin Essentials and players can send private message with /tell or /m and with this, they can send ip. example :
    /m pseudo 12.34.56.78

    not normally too.

    I hope not asking too much ?

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 22, 2016
  9. Offline

    Wolfy9247

    @clavat
    Hm, I could take a look and see if there's a way to hook into the Essentials API and make it compatible with that, or possibly even use Vault as an easier way to hooking into the chat system. This would however require me to include Vault.jar in a .zip file with the current plugin, if you don't mind that..

    As for your first problem with players sending domains normally like "google.com" without http:// or www. I'll try and work on that some whenever I have time- I'm not sure if it's possible, but I can only assume. I'll get back to you on this one.
     
  10. Offline

    md_5

    Approved
     
  11. Offline

    SilencShadoW

    Hey Guy,
    i realy love this =D but i got 2 suggestions!

    can u implement a ignore list? like ip 123.123.123.123 is ok to post but 123.123.123.122 not ...
    and maybe custom domains with *.minecraft.to *.xyz.xyz ... for nitrado and other domains, or something like that?
     
  12. Offline

    Wolfy9247

    So in the config.yml you'd want something like:

    AntiPub:
    Ignore:
    - 123.123.123.123
    - [^regex] (This wouldn't actually work, just implying a regex could be entered as well)
    - minecraft.to
    I might possibly be able to make something like that whenever I get time next. Thanks though!
     
  13. Offline

    Juze

    Would this block IP addresses such as "localhost" or "127.1"? How about using colons instead of dots, or spaces? Doubt it would, also, in my opinion, this only causes more harm than good. Things can always be worked around and disabling legit addresses without the need for www makes a bad choice for this plugin. :(
     
  14. Offline

    Wolfy9247

    It doesn't block "localhost" as, well, there's no need to block that. It does block "127.0.0.1" but there's really no reason to need to post that either in the first place. And it doesn't block on semi-colons, but I can add that to the regex filter in the next update. And as for spaces, it removes all spaces from the equation using a regex filter, so even if someone put 127 . 0 . 0 . 1 it'd still be registered as an IP, as far as I've tested at least. And if you mean spaces such as 127 0 0 0 1 it doesn't block it, as those are just numbers, and there's really no way to detect it's an IP address without mistaking it for something else.

    As for your concern on the domains, you're able to disable that feature completely if you'd like, so no, it doesn't make for a bad choice on a plugin.

    Edit: I've just had this thought, but when there's semi-colons in an IP address that's an IPv6, not an IPv4, and I'd have to put in a separate filter for that. I realize what you mean, as if someone put 127:0:0:1, but I could see what I could do.
     
  15. Offline

    SilencShadoW

    what is regex? but yes, i mean that :D but with minecraft.to i mean BLOCK own defined links like

    Ignore:
    - 123.123.123.123
    Block:
    - *.minecraft.to
    - *.g-portal.de

    all ips like xxx.minecraft.to xyz.minecraft.to ... and all g-portal.de links ... u understand?
     
  16. Offline

    Juze

    Just fyi, IP addresses do work without inputting some numbers if there are zeros or something. They are automagically filled in. Again, like you said, they can be worked around and cannot possibly always be prevented. And some people may be dumb and give 127.0.0.1 = 127.1 as their IP.
     
  17. Offline

    Wolfy9247

    Hm, that's a bit of fact that I didn't know, but I doubt most of anyone who's looking to spam some sort of IP won't take the time to know this sort of thing. However, I don't like just counting on that fact, so I could take a look at the filter sometime and see if I can add some sort of rule for that if zeroes aren't included. Just haven't had much time lately!
     
  18. Offline

    SilencShadoW

    Hey Guy,
    your plugin got a bug, since i installed, its destroy some chat environments :D like /a (adminchat from mcmmo) or /mute from essentials .. if i mute someone he can still write with <user> text ... and /a makes

    silencshadow: hi guys
    <silencshadow> hi guys

    .. it make something wrong with the chat, if the user chat is editded by a plugin, i hope u understand :S sry for my bad english
     
  19. Offline

    Wolfy9247

    It's a bit hard to understand you, but I think I'm getting what you're getting at. So to clarify, if someone is /mute(ed) from the Essentials plugin, and also muted on my (AntiPub) plugin, then they're still able to speak? If that's the case, I could possibly look into what Essentials does differently with the chat, but it seems like it's overriding this plugin trying to modify chat events in this case.

    Also, you mean if you type /a, then type something, it'll look like: <Wolfy9247> Lorem Ipsum?
    I'm not quite sure on what the problem is there, so can't begin to really take a look at how to go about fixing it.
     
  20. Offline

    SilencShadoW


    All plugins, which modify the chat, are crashed by your plugin :p mcMMO got a admin chat with /a ... every text message are splitted up ..
    first line, the real one
    second line, which your plugin cause, <silencshadow> text

    if someone get muted ... he cant speak, essentials modify the chat, but ur plugin want to let them chat anyway ...
     
  21. Offline

    Wolfy9247

    There must be some issue with both of them trying to monitor the chat, and as I'm not one of those veteran plugin devs I can't say that I know right off the bat what's causing that. Is it truly crashing, or merely just causing it to act differently though? If there's a stacktrace in the console, that might help some.

    I'm still having some problems understanding what it's doing with the mcMMO plugin though. I'm not back at my house this weekend though, so it'd be a bit easier to understand once I get back on Monday most likely.
     
  22. Offline

    SilencShadoW

    just install essentiasl, try to mute someone ... and install mcmmo write /a and chat a bit :) then uwill see
     
  23. Had a look at your source. One thing: You should not set the cancel to false and as such compromise other plugins! You should use something like that instead:
    Code:java
    1. if(event.isCancelled(true) || player.hasPermission("antipub.*") || player.hasPermission("antipub.bypass"))
    2. return;
     
  24. Offline

    Wolfy9247

    Hm, alright! I'll have to make that change next commit, I didn't know that'd be a problem. I haven't worked with the Bukkit API for long, heh.
     
  25. To explain it: If the event is canceled it has a reason. So if the event is cancelled just ignore it (return) instead of re-enable it. You wouldn't like it if you cancel a event and another plugin re-enables it. The worst thing about that: Nobody would complain about the plugin re-enabling the event, everybody would complain about the plugin which cancels it: Example: Another plugin re-enables the canceled event from your plugin, people would cry to you: "Hey, people got the message that they are not allowed to write IPv4 addresses in the chat, but in fact everybody can still see the address! There's something wrong in your plugin!". :)
     
  26. Offline

    Jobsti

  27. Offline

    Wolfy9247

    I'll try 'n get on this later tonight and look at what's causing it, I suspect it's something that I messed up when trying to modify the code to fit around the new event system.

    Sorry for that!
     
  28. Offline

    Wolfy9247

    Jobsti
    Updated to version 0.2.2, fixed the NPE error that was occurring. It should be all good to go now! I'll also try and possibly looking at pairing this with Dynmap, it's going to require more of my time than I currently have though, sorry!

    Hope you enjoy the plugin either way! ^_^

    Oh also V10lator I changed the event.setCancelled(false) to return; now.
     
  29. Offline

    Phantom Index

    Doesn't work with HeroChat5
     
  30. Offline

    Wolfy9247

    It doesn't help that you're simply saying 'it doesn't work', that doesn't give me even a clue as to what's not working. If it's simply allowing IP addresses and/or domains through the chat, it probably has something to do with events being re-enabled.
     

Share This Page