Inactive [ADMN/SEC/CHAT] SpamHammer v1.7b - Punish those spammers [1000]

Discussion in 'Inactive/Unsupported Plugins' started by dumptruckman, Jul 14, 2011.

  1. Offline

    dumptruckman

    SpamHammer - Lay down the law on spammers
    Version: v1.7b

    Detects people sending too many messages in short amounts of time (and optionally repeat messages). Mutes, kicks, and then bans players that spam the same message in that order. Server OPs are unaffected. The default settings that this installs with will only detect VERY fast messages... In other words, it will only really prevent automated spam. If you want to detect slower spam, try something like 5 messages in 3 seconds or something. Experiment!

    Instructions:
    • Download the jar to your plugin folder and start your server.
    • Change the default settings if you want:
      • Message Limit is how many messages within the Message Period (seconds) before action is taken against the player. The default is 3 messages within 1 second.
      • *NEW* Add commands to
        Code:
        commandlist:
              possiblespam:
        that you might consider to be spam. By default /g, /general and /yell are added as examples.
    • Choose whether to use each action type. (Mute/Kick/Ban)
    • Configure the messages as you like them. Mute has a mute time to keep the player muted for. Use %t in the message to replace with the mute time.
    • Set a "cool-off" time for when to reset the action level of a player.
    • Note: all times are in seconds
    • Note: actions will always happen in order unless they are disabled. Mute, kick, then ban.
    • After the config is set to your liking, restart or reload the server.
    • You can now choose to disable all punishments and instead have SpamHammer simple rate limit messages.
    Commands:
    • spamunmute - unmutes a player muted by SpamHammer
    • spamunban - unbans a player banned by SpamHammer
    • spamreset - resets the punishment level of a player.
    SuperPerm nodes:
    • spamhammer.unban - allows access to /spamunban
    • spamhammer.unmute - allows access to /spamunmute
    • spamhammer.reset - allows access to /spamreset
    • spamhammer.ignore - makes player unaffected by SpamHammer
    • spamhammer.* - grants all above permissions
    Download latest version
    Source Code

    Changelog:
    Version 1.7b
    • Now has option to not use permissions and instead use OP only for the commands. This will allow for greater compatability.
    Version 1.7a
    • No longer considers all commands for spam blocking by default. Added spammable command list to config where you should add commands that could be considered spam.
    Version 1.6
    • Added back repeat message block as a default option.
    Version 1.5a
    • Added bukkit permissions support.
    Version 1.4
    • Added config option (default: true) to prevent messages over the limit from appearing. This will allow for non-punishment solutions.
    Version 1.3b
    • Disabling certain punishments no longer breaks the ones still enabled.
    • Because this plugin could break features of BukkitContrib, players with the BC client mod on a server with the BC plugin will not be affected.
    Version 1.3a
    • SpamHammer now additionally picks up command usage to prevent using chat commands as a work-around.
    Version 1.2
    • Modified the way the plugin detects spam... Now works faster and more effectively.
    • Changed the config options.
     
    Mitsugaru and pandapipino like this.
  2. Offline

    BigRenegade

    Definitely have to give this a try! If it works as well as the GUI and ChestRestock will definitely keep it on the server. :)
     
  3. Offline

    ekeup

    doesn't seem to work... had users spam messages a lot and nothing happens
     
  4. Offline

    codename_B

    Title needs to include the latest release build.
     
  5. Offline

    BigRenegade

    @codename_B you might not want to use bright yellow text for a white background. It can't be read.
     
  6. Offline

    dumptruckman

    Yeah... sorry about that. Works now!
     
  7. Offline

    spunkiie

    does it work with HeroChat ?
     
  8. Offline

    dumptruckman

    I'm not entirely sure, but I don't know why it wouldn't... It only cancels chat events when players are muted... If HeroChat doesn't cancel chat events, it should work.

    Edit: and even then, it might work.
     
  9. Offline

    spunkiie

    I'll test it for you righ now... BRB

    Test done.
    Works partially with herochat

    HeroChat has aliases for quick sending a msg to a channel.
    i.e: /g <message> - sends a global msg.

    If the spammer uses the alias, the plugin won't stop him :(

    Here's the LOG:

    15:12:01 [INFO] Hard_Disk tried to use command /g a
    15:12:01 [INFO] [g] [Mod] Hard_Disk: a
    15:12:03 [INFO] Hard_Disk tried to use command /g a
    15:12:03 [INFO] [g] [Mod] Hard_Disk: a
    15:12:05 [INFO] Hard_Disk tried to use command /g a
    15:12:05 [INFO] [g] [Mod] Hard_Disk: a
    15:12:06 [INFO] Hard_Disk tried to use command /g a
    15:12:06 [INFO] [g] [Mod] Hard_Disk: a
    15:12:07 [INFO] Hard_Disk tried to use command /g a
    15:12:07 [INFO] [g] [Mod] Hard_Disk: a
    15:12:08 [INFO] Hard_Disk tried to use command /g a
    15:12:08 [INFO] [g] [Mod] Hard_Disk: a
    15:12:09 [INFO] Hard_Disk tried to use command /g a
    15:12:09 [INFO] [g] [Mod] Hard_Disk: a
    15:12:10 [INFO] Hard_Disk tried to use command /g a
    15:12:10 [INFO] [g] [Mod] Hard_Disk: a
    15:12:11 [INFO] Hard_Disk tried to use command /g a
    15:12:11 [INFO] [g] [Mod] Hard_Disk: a
    15:12:13 [INFO] Hard_Disk tried to use command /g a
    15:12:13 [INFO] [g] [Mod] Hard_Disk: a
    15:12:15 [INFO] Hard_Disk tried to use command /g a
    15:12:15 [INFO] [g] [Mod] Hard_Disk: a
    15:12:16 [INFO] Hard_Disk tried to use command /g a
    15:12:16 [INFO] [g] [Mod] Hard_Disk: a

    Hope it helps.

    Idea: Maybe an option to add specific aliases (in config.yml) for spam checking as well

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

    dumptruckman

    @spunkiie
    I actually just updated to 1.2 to detect spam far better. Now it uses a rate limit. So you specify how many messages players are allowed to send per x amount of seconds. This can even work against slower spam if you do like 20 messages in 15 seconds or something like that. The default is 3 messages in 1 second. Which I guess is pretty fast and probably only achievable by a program. I do see what you're saying though. I'll see if I can catch player commands as well. Should there be a different rate setting for commands?

    Okay, 1.3 now detects command usage in addition to messages.

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

    spunkiie

    Cool.. Will test ASAP

    Doesn't seem to be working :(

    18:05:48 [INFO] SpamHammer 1.3a enabled.
    .......
    18:06:45 [INFO] ddadminx tried to use command /g a
    18:06:45 [INFO] [g] ddadminx: a
    18:06:46 [INFO] ddadminx tried to use command /g a
    18:06:46 [INFO] [g] ddadminx: a
    18:06:47 [INFO] ddadminx tried to use command /g a
    18:06:47 [INFO] [g] ddadminx: a
    18:06:48 [INFO] ddadminx tried to use command /g a
    18:06:48 [INFO] [g] ddadminx: a
    18:06:48 [INFO] ddadminx tried to use command /g a
    18:06:48 [INFO] [g] ddadminx: a
    18:06:49 [INFO] ddadminx tried to use command /g a
    18:06:49 [INFO] [g] ddadminx: a
    18:06:50 [INFO] ddadminx tried to use command /g a
    18:06:50 [INFO] [g] ddadminx: a
    18:06:51 [INFO] ddadminx tried to use command /g a
    18:06:51 [INFO] [g] ddadminx: a
    18:06:52 [INFO] ddadminx tried to use command /g a
    18:06:52 [INFO] [g] ddadminx: a
    18:06:53 [INFO] ddadminx tried to use command /g a
    18:06:53 [INFO] [g] ddadminx: a
    18:06:58 [INFO] ddadminx tried to use command /ch a
    18:06:59 [INFO] ddadminx: a
    18:07:01 [INFO] ddadminx tried to use command /ch g
    18:07:02 [INFO] [g] ddadminx: a
    18:07:03 [INFO] [g] ddadminx: a
    18:07:03 [INFO] [g] ddadminx: a
    18:07:03 [INFO] [g] ddadminx: a
    18:07:47 [INFO] ddadminx tried to use command /g a
    18:07:47 [INFO] [g] ddadminx: a
    18:07:48 [INFO] ddadminx tried to use command /g a
    18:07:48 [INFO] [g] ddadminx: a
    18:07:49 [INFO] ddadminx tried to use command /g a
    18:07:49 [INFO] [g] ddadminx: a
    18:07:50 [INFO] ddadminx tried to use command /g a
    18:07:50 [INFO] [g] ddadminx: a
    18:07:52 [INFO] ddadminx tried to use command /g a
    18:07:52 [INFO] [g] ddadminx: a
    18:07:53 [INFO] ddadminx tried to use command /g a
    18:07:53 [INFO] [g] ddadminx: a
    18:07:53 [INFO] ddadminx tried to use command /g a
    18:07:53 [INFO] [g] ddadminx: a
    18:07:54 [INFO] ddadminx tried to use command /g a
    18:07:54 [INFO] [g] ddadminx: a


    No kick, no mute, no ban.

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

    dumptruckman

    Interesting... I'll have to talk to the HeroChat dev and see what I can do to be more compatible.

    @spunkiie Actually, what's your message limit and message period set to in the config? I realized that you're really not typing that fast.

    edit: the default configuration is set up to block only extremely fast messages. It no longer looks for duplicates.

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

    spunkiie

    oh, I will test again then :D

    @dumptruckman

    I've tested your plugin a little more. The timing between messages you pointed out was true. But, after I changed the config.yml (setted to 3 messages in 3 seconds). The plugin started to "mute" as expected.

    BUT...

    Even while receiving the "You're muted" message, ppl was still able to read my messages. (bug:1)
    And after the mute time expired the plugin won't mute-me anymore, even if I flood 10 messages in 3 seconds(bug:2)

    Hope it helps!
    TY

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

    dumptruckman

    Hmm, it's interesting they can still read your messages... I'll have to look into that further.

    As for bug 2, did you disable kick or ban? I could see that being an issue but if you didn't, you should be kicked. Let me know.

    And thanks for the reports! :)
     
  15. Offline

    spunkiie

    Yeap, kick/ban disabled. I just expected to be muted again.. but didn't happen.

    As of bug:1 I think this is probably incompatibility with HeroChat, maybe integrating with the HeroChat own mute command would solve the issue.

    Ty again
     
  16. Offline

    dumptruckman

    Yes, I'll look into integrating with HeroChat's mute.. Might be the only way. Also, yeah, the other thing is a bug. Will fix soon.

    @spunkiie ok, 1.3b is out.. It fixes the bug with mute not working more than once... As for hero chat.. It's an issue with HeroChat that I don't think I can fix. I've requested that they fix HeroChat instead. (They didn't do something right as far as I can see.)

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

    GTA4rox08

    Nice plugin!
     
  18. Offline

    dumptruckman

    Thanks :) It's funny, I don't have any use for it. I made it because someone showed me a program that spams servers and I thought that was pretty lame.
     
  19. Offline

    solidsnake916

    This plugin is great, but can you make it support detection by usernames so if the person is using a chatfile to spam or not the same word over and over, it will detect that as well.

    Example: If theres x amounts of chat messages per second from (Username) then mute/kick/ban.
     
  20. Offline

    dumptruckman

    Well, the latest version does work on an x amount of chat messages per x amount of seconds. You can configure each value in the config file. I'm not sure what you mean by detection by usernames though.
     
  21. Offline

    solidsnake916

    i mean if someone is not using repetitive text. like the spam they send is different per message. Will this plugin stop that?
     
  22. Offline

    dumptruckman

    That's exactly what it does. The default configuration is for very fast messages.
     
  23. Offline

    solidsnake916

    Well in the title it says "Detects repeat messages/commands and takes steps to prevent them" so i was like damn almost what i needed lol. But since you say it can do it, ill test it out.
     
  24. Offline

    dumptruckman

    Oh, woops, thought I changed that... that's how it worked in 1.1... I changed it in 1.2 to be X messages per Y seconds.
     
  25. Offline

    solidsnake916

    Thanks for the plugin!
     
  26. Offline

    housemaster

    Is it possible to configure so that players simply cannot send more than x messages per x seconds, without any messages or punishments?
     
  27. Offline

    dumptruckman

    Great idea! I will see about adding this.

    1.4 released. It contains requested feature. It's enabled by default so just disable all the punishments.

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

    MonsieurApple

    Please fix the build version in your title.
     
  29. Offline

    dumptruckman

    Excuse me?
     
  30. Offline

    housemaster

    Great! Thanks!
     

Share This Page