Prevent sending same sentence by "enter-uparrow-enter"

Discussion in 'Archived: Plugin Requests' started by Dotoo, Dec 10, 2013.

  1. Offline

    Dotoo

    Hi. I would like to have a plugin which prevents players (not bots) saying same sentence over and over.
    The situation is, player A says "want to sell 64 stones for 1 diamond!!", player A really want to have a good deal but of course they can't. player A thinks other player did not see his chat so he simply hit enter, up arrow, enter to post same sentence every 30 seconds.
    In my server, I have like 80 players online and chat is full of same sentence. Chat channel does not work at all because they all want to advertise their own deal in global chat anyway.
    Most of spam block plugin has no ability of punishing same sentence if they sending chat with some interval. I want to block entire "enter-uparrow-enter" actions totally regardless they take long interval or not.

    There is bunch of plugin that prevents spam caused by bots. These does not fit with my server.
    Most of spam block plugin has overkill punishment and only (e.g. kick or ban, in some case, mute). I just want to players not using the "enter-uparrow-enter" method to keep posting same sentence.

    Blocking the "enter-uparrow-enter" is enough, but I want to make players not able to use chat for short time if they send same sentence to chat. Preferably, enter simple 4-6 letter captcha to use chat again. But muting for 30 seconds are also sufficient to me.

    Does anyone able to create this?
     
  2. Online

    timtower Administrator Administrator Moderator

    Dotoo We can't check if the player is hitting certain keys
     
  3. Offline

    Garris0n

    You could use the NoCheatPlus captcha and probably weight sending the same sentence really high to trigger it.
     
  4. Offline

    Dotoo

    timtower Yeah you're right. We cannot check the enter-uparrow-enter itself needless to say this is client side action. But checking the sentence is absolutely possible. I only want to stop duplicated message sent by same person.

    garrison Thanks for suggestion. NCP may fit for my situation but I would rather make my plugin setup compact as possible. Besides, I have reason I cannot simply install NCP due to my server's style. In our server, people can fly really high, sprint is real fast, and my server is 100% dedicated to gun PvP using crackshot. NCP does not support these situation at all. And personally, I have not found any single cheater through NCP so I treat it as... useless. I do not want to install such a big plugin just to prevent the enter-uparrow-enter spaming due to the fact blocking same sentence sounds rather easy.
     
  5. Offline

    Developing

    Dotoo I will try to do this , but no gurantees.
     
  6. Offline

    AndyMcB1

    It's not like that - It's check if the player has said the same message (in the last say, minute) don't allow it and send a configurable message to them telling so.
     
  7. Online

    timtower Administrator Administrator Moderator

    Like already said to me
     
    AndyMcB1 likes this.
  8. Offline

    TryB4

  9. Offline

    Developing

    Dotoo https://www.dropbox.com/s/0povryy5wwdhkjp/AntiSameSentence.jar

    Commands | Usage
    /antisamesentence | Shows all commands
    /antisamesentence reload | Reloads the configuration file
    /antisamesentence disable | Disables the plugin

    Permissions | Usage
    antisamesentence.command | /antisamesentence
    antisamesentence.reload | /antisamesentence reload
    antisamesentence.disable | /antisamesentence disable
    antisamesentence.bypass | Bypasses the blocker

    Configuration
    mute-duration-in-seconds: 10

    I have tested and confirmed that this is working. I defaulted the mute duration to 10 seconds as it works best. Enjoy :)
     
  10. Offline

    Dotoo

    @TryB4
    @Developing

    I have downloaded and going to test both tomorrow. My server and players really needed these kind of simple yet powerful plugin.
    I am really appreciate your hard work and kindness. Thanks.
     
  11. Offline

    dunbaratu

    Does it also end up preventing a "/" command in the chat window if it is a duplicate of the previous "/" command?

    Because I see a problem regardless of the answer to that question:

    If the answer is "yes it prevents duplicate / commands", then the problem is that there are legit cases where it's proper to run the same command again and again (i.e. adding vertices to a line you are drawing for the dynmap for example).

    If the answer is "no it doesn't prevent duplicate / commands", then the problem is that players can just avoid the chat restriction by explicitly issuing a / command that sends messages out.
     
  12. Offline

    Dotoo

    TryB4
    I have got following error. I am using Craftbukkit 1.6.4. Your plugin may not compatible for my version. I am sorry I did not tell you which version I am using.
    Code:
    [SEVERE] Could not load 'plugins\NoSpam.jar' in folder 'plugins'
    org.bukkit.plugin.InvalidDescriptionException: main is not defined
        at org.bukkit.plugin.PluginDescriptionFile.loadMap(PluginDescriptionFile.java:820)
        at org.bukkit.plugin.PluginDescriptionFile.<init>(PluginDescriptionFile.java:188)
        at org.bukkit.plugin.java.JavaPluginLoader.getPluginDescription(JavaPluginLoader.java:252)
        at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:132)
        at org.bukkit.craftbukkit.v1_6_R3.CraftServer.loadPlugins(CraftServer.java:239)
        at org.bukkit.craftbukkit.v1_6_R3.CraftServer.<init>(CraftServer.java:217)
        at net.minecraft.server.v1_6_R3.PlayerList.<init>(PlayerList.java:56)
        at net.minecraft.server.v1_6_R3.DedicatedPlayerList.<init>(SourceFile:11)
        at net.minecraft.server.v1_6_R3.DedicatedServer.init(DedicatedServer.java:107)
        at net.minecraft.server.v1_6_R3.MinecraftServer.run(MinecraftServer.java:393)
        at net.minecraft.server.v1_6_R3.ThreadServerApplication.run(SourceFile:583)
    Caused by: java.lang.NullPointerException
        at org.bukkit.plugin.PluginDescriptionFile.loadMap(PluginDescriptionFile.java:815)
    Developing
    I have tested your plugin in several way and so far this is perfect. However, I have another request. Is it possible to add an option that determines how long until they can post same sentence?
    I want to make player not posting twice for 5 minutes or so while the "punishment mute" time still stays short like you have suggested for me already.
    I have heard calculating real time in Craftbukkit is not that easy so ignore my request if this is big business for you.

    And I would like to add your name as credit or special thanks in my server site. Would you mind if I add you?
     
  13. Offline

    Developing

  14. Offline

    Dotoo

    Developing
    Thanks again for your awesome work. I will definitely add your name on my server site. In fact, I am japanese and most japanese server info/ip is centralized in a site called "Minecraft unofficial japanese user forum". So. technically I have no my own site (yet). My server topic can be found here: (Edited: Removing Server promotion link)
    In my server there is like 7-80 people online at hot time. My server was full of spamming for "selling guns for $10000" and players had difficulty of communications. I am not talking this big, Your plugin going to be one of most important one hands down.

    P.S. How would I give you credit in naming wise? "Developing"? :D

    @dunbaratu
    Yeah, you are right. Like a server which allows players use "/me" command can still spam the chat. Thankfully, In my case there is almost no commands that players can use. Only command they can use is "/spawn" basically. Everything else will be executed by server console through another plugin called Scriptblock and CommandSign. Developing's plugin just prevents players simple chat spaming and Not prevent using commands. This is perfect for my server due to the fact I do NOT want players punished but rather give them just a little notice that they should not keep sending same sentence to overflow my server's chat log.
     
  15. Offline

    Developing

    Dotoo Now , you better remove your server link before necrodoom does it for you and yes Developing will do.
     

Share This Page