Warn and Banning System

Discussion in 'Archived: Plugin Requests' started by Spawnstah, Apr 18, 2013.

  1. Updated with more details and example for Config.yml
    I got an idea for a new Warn and Ban system that i have not seen around.
    • Mysql support so it works across multiple servers. Either all my own servers, or in cooperation with another server if we share MySQL Databases.
    • Per-Player History. I would like to be able to see if a user has been Warned or Tempbanned before i issue a real ban. And a somewhat automated ban system that benefits players who behave and not break the rules.
    • Reward players who behave, and automatically permban players who constantly missbehave as described below:
    All users start with 5 points when they logon for the first time. Each user get 0,2 points per day if they have logged in and played for at least 30 minutes that day. So a user who behaves will after 25 days have gathered 5+(25days*0,2)=10 points.
    When a user reaches 10 points, he will be periodically rewarded as long as he stays at 10points (or more). If a user miss behaves as in gets a warning, tempban or permban(!) he will loose points and have to earn them again. Or if he gets too low on points, he will automatically be permbanned.

    Let me give you some examples:

    I think the scores by default should be something like, but can be changed in the config (example below);

    NewPlayers = 5 points
    Warning = -3 points
    TempBan = -5 points
    TempBanTime = -1 point per 24h ban
    PermBan = -20 points
    MinTimePerDay = 30m
    MaxPoints = 11
    AutoPermBan = -10

    An example
    Show Spoiler

    So if a new user is warned on his first day, 5-3=2 points (initial Points - waring = new points).
    He then logs on and plays for at least 30 minutes, and behaves for 5 days and gain 5days*0,2=1 point so he is at 2+1=3 points.
    He is then hit by a tempban of 4 days; 3-(5 tempban + 4 days)= -6 points

    All right, so far so good. That user will not gain any new points until his tempban has expired and he can logon and plays for at least 30 minutes. And will then slowly gain points and in the end be rewarded if he behaves.

    -10 points will automatically translate into a Permban
    +10 points will give some perks, not sure if it should be Gold or items. If it should be per week or per day a user logon. Any thoughts?
    +11 max points (gives a small buffer in case of a warning, and a user with +11 points would actually survive a PermBan with these settings).

    Example of Config.yml
    Show Spoiler

    - Points:
    # The Number of points a new Player starts with
    - NewPlayers: "5"
    # Amount of points a Waring is deducted.
    - Warning: "-3"
    # Amount of points a TempBan is deducted.
    - TempBan:
    - Points: "-5"
    # Maximum Lenght of a TempBan
    - MaxTime: "5d"
    # How many points are additionally deducted per time Period for a TempBan.
    - TempBanTime: "-1"
    - Period: 24h
    # How many points are deducted for a permban.
    - PermBan: "-20"
    # If a user goes below this amount, permban the user.
    - AutoPermBan: "-10"

    - BonusPoints:
    # When should a user be granted points?
    - BonusPoints:
    # How often should points be awarded?
    - Period: "1d"
    # Does the user has to be online a certain amount of time per day before he is gaining points?
    - MinTimeOnline: "30m"
    # How many points should a user get per period?
    - Points: "0.2"

    - Awarding:
    # Minimum points before being Awarded.
    - MinAward: "10"
    # The Maximum amount of points a user can have.
    # Warning: Setting this higher than AutoPermBan+PermBan will result in that a user could avoid being PermBanned.
    - MaxPoints: "11"
    # How often should the award happen?
    - Period: "1d"
    - MinTimeOnline: "30m"
    # Specify the Awardtype if it should be
    - AwardType: Item or Command or Money
    - Item:
    # If Random=True, give a Random item from the list. Else all.
    - Random: False
    - ItemId1: 1
    - ItemId2: 2
    # Execute these commands each time.
    - Command:
    # If Random=True, execute one of the commands form the list. Else all of them in order.
    - Random: True
    - Command1: /give {username} dirt 64
    - Command2: /pex user {username} promote
    - Command3: /Test
    # Add Money to the Users Account via Vault.
    - Money: "500"

    # Bonus Feature. Remove points if a user has not logged in for some time.
    - Deduction:
    - Period: "2w"
    - Amount: "-1"
    # Don't remove points below this value.
    - MinPoints: "7"

    Since all the Values are possible to customize it's also possible to configure it to be a 3 strike system. Just make players start with like 5 points. Set Warning and Bans to be -5 points and don't give any points to users. After 3 infractions, the user will be at -10 points = permban.

    Preferably also make a custom message to the banned user, stating why he was banned and when it will expire.

    Example of commands.
    Show Spoiler

    /swarn {player} {Message} : Give a user a warning
    /stban {player} {period} {Message} : Tempban a player for X time with Y reason.
    /spban {player} {Message} : PermBan a player.
    /infractions {player} : Shows own History/Status or another Players History/Status if permissions.

    What do you think?

    I can add more text, and help with /commands and permissions etc if someone thinks it would be fun to code.
    45zeldafan likes this.
  2. Offline


    Looks like mcbans, though mcbans is bound to their servers
  3. Not really, McBans is bound to their servers and points are not deducted over time and not possible to award players who behave.


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


    One bump per 24 hours.

    This isn't a bad idea. I would like to see a developer make this :D
  5. Offline


    Actually if nobody's doing it now, what to 'bump' for?
  6. Offline


    Good idea. Someone please make this! :)
  7. Well, its in plugin requests. So in my ignorance I was hoping someone might be interested in coding it...

    I've updated the original post with additional information and an example of a Config.yml with comments for the different configurable values.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
    Last edited by a moderator: Jun 1, 2016
  8. No one who's interested in doing this? Too big project?
  9. Offline


    I hate to commit to something, but I can do this. No, this isn't promising that I'll get it done in a week (I'm leaving for a week tomorrow). But I can certainly look into it, if you'd like. I'll see what I can do today, and next weekend.

    EDIT: Edit to my previous post:
  10. Ahhh, I had not seen Infractions before, it looks like it does some parts of this already and I would be really grateful if you could add the the rest, if and whenever you have time.

    Thanks for thinking about it. :) And have a great week off!
  11. Hi, just want to touch base and see if this is still on the ToDo-list?


Share This Page