Allow Chat After /vote

Discussion in 'Requests' started by MK500, Dec 5, 2016.

  1. MK500

    MK500 Slime

    Messages:
    77
    GitHub:
    markkrueg
    For free servers; it would be useful to have a way to avoid spammers by forcing them to /vote before they can interact with the community via chat.

    Maybe the plugin could be called something like "ChatAllow". It would be nice if it worked similarly to the /tempban command in EssentialsPE. So you could say:

    /chatallow MK500 48h
    or
    /chatallow MK500 2d

    This would allow MK500 to chat for 48 hours. At the end of the 48 hour period it would remove their ability to chat again. If they attempt to chat when not allowed it would show a message that should be set-able in the config file. It could say something like:

    "You are not allowed to chat. Please use the /vote command to enable chat."

    This would be flexible; because you could use any sort of script or command to verify the user before issuing the /chatallow command. Maybe some would use an email based system. Or some would force players to make a request in a forum before allowing chat.

    It would also be useful if the config file could have other commands that are blocked when players are not allowed to chat. That way you could choose to also block /tell or even /warp, etc.

    References:
    https://github.com/LegendOfMCPE/EssentialsPE
    https://github.com/LDX-MCPE/VoteReward
     
  2. InspectorGadget

    InspectorGadget Zombie Pigman

    Messages:
    465
    GitHub:
    InspectorGadget
    That is actually cool, I'm planning to make one. Just not sure with the way on how to check after its 48 hrs or so. Anyone have any idea?
     
  3. Primus

    Primus Zombie

    Messages:
    324
    Awful idea. That's really selfish and by saying "to deal with spammers" you're justifying yourself. Respect your players, don't put rule of gold above Golden rule!

    PHP:
    /**
     * Player name => UNIX Timestamp
     * @type array
     */
    public $canSpeak = [];

    public function 
    onChat(PlayerChatEvent $event) {
       if((
    $s $this->canSpeak[$event->getPlayer()->getName()] ?? false)) {
          
    $p time() + 3600 48// 48 hours
          
    if(time() <= $p) {
             unset(
    $this->canSpeak[$event->getPlayer()->getName()]);
          } else {
             return;
          }
       }
       
    $event->setCancelled();
    }
     
    applqpak and EdwardHamHam like this.
  4. MK500

    MK500 Slime

    Messages:
    77
    GitHub:
    markkrueg
    Make sure to tell us your GitHub if/when you work on this. Open Source plugins are the best plugins; and I'm sure others would contribute code/debugging.

    I'm not sure what you mean by "rule of gold". Voting costs nothing. It's just a way of confirming real players by giving them a small hoop to jump through.
     
  5. Primus

    Primus Zombie

    Messages:
    324
    Voting actually does cost a time and as we all know time is money. That's not deal right here. You're selling such fundamental thing as speaking for a vote. Can you now draw a line through these relevances? Let me help you if not - You get a vote, which is increments the popularity and outstanding (basically the same thing, right?) of your server, that, however attracts your potential customers of your super awesome shop (And I assume that's what you got). Why don't you put any other player verification system in which you don't get material benefits of? Or simply filter the chat :p
     
    applqpak likes this.
  6. InspectorGadget

    InspectorGadget Zombie Pigman

    Messages:
    465
    GitHub:
    InspectorGadget
    Sure!
     
  7. MK500

    MK500 Slime

    Messages:
    77
    GitHub:
    markkrueg
    The first three words of my post were "For free servers". The server I donate my time to is not a business, does not take donations or have a shop, and is completely free. The Admins were picking my brain for ways to both improve visibility of the server and also reduce players from spamming the chat who aren't really part of the community; but just come by to spam. That is how I came up with this idea.

    I can understand the assumption though, as the vast majority of servers are commercial.
     
  8. remote_vase

    remote_vase Creeper

    Messages:
    4
    Correction: The vast majority of public mcpe servers are commerical
     
    Primus and HimbeersaftLP like this.
  9. archie426

    archie426 Baby Zombie

    Messages:
    127
    GitHub:
    archie426
    Err, do you mind not repeating yourself?
     
  10. SOFe

    SOFe Administrator Staff Member PMMP Team Poggit Admin

    Messages:
    1,908
    GitHub:
    sof3
    And so you are telling us you are making something and you don't even know if the most fundamental part of it is feasible?
     
  11. Thunder33345

    Thunder33345 Moderator Staff Member

    Messages:
    2,159
    GitHub:
    Thunder33345
    I agree on primus but it seems like some sort of trade off like pay [your time] to chat
    quite interested and i think it would be fun to make i will see what i can do
    all "requirements" are passed i have some good idea on how to make the timer and so on

    but i dont want every damm server to ask me to vote just to chat
    i dont mind 100% free server like [shameless plug to] worse server ever but i wont like paid faction server doing the same thing
     
    Primus likes this.

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.