[SCRIPT] helpban.py

This script may be helpful, the purpose of this command is to make it easier to ban a player during a certain time, usually the "/ban" command takes the "time" through the minutes, so 1 day will be " 1440 ", 2 months would be" 87600 ", 1 week" 10080 "etc.

Commands:

  • /mban [#player ID or nick] [format time] [reason]

  • /checkban [ip]

  • The /mban command has special characters:

p = permanent ban
m = ban for months
w = ban for weeks
d = ban per days
h = ban by hours
t = ban per minutes (I do not think this is necessary but I also put it in case someone needs it)

Permanent ban

  • In case you want to ban a player permanently you will only have to use the following format:

/mban [player] [p] [reason]

For example:

/mban #2 p esp/ab

Ban per months

  • If you want to ban a player either for 1 month or more you should use the following format:
    /mban [player] [number of months / m] [reason]
    For example (ban for 2 months):
    /mban MegaStar 2m for being cool

Ban per weeks:

  • If you want to ban a player either for 1 week or more you should use the following format:
    /mban [player] [number of weeks / w] [reason]
    For example (ban for 1 week):
    /mban #2 1w superjump

Ban per days:

  • If you want to ban a player either for 1 day or more you should use the following format:
    /mban [player] [number of days / d] [reason]
    For example (ban for 3 days):
    /mban #2 3d evasion/esp

Ban per hours:

  • if you want to ban a player either for 1 hour or more you should use the following format:
    /mban [player] [number of hours / h] [reason]
    For example (ban for 5 hours):
    /mban #3 5h griefer

Ban per minutes

  • If you want to ban a player either for 1 minute or more you should use the following format:
    /mban [player] [number of minutes / t] [reason]
    For example (ban for 30 minutes):
    /mban #3 30t votekick abuse

  • When a player is banned, the script will send a message to all administrators saying that the "player" has just been banned by "name of the admin/guard/etc" for "duration of the ban" with the reason of "reason of the ban"
    Example:
    "MegaStar was banned by MoDeR for 2 months with the reason of: for being cool"

Checkban

  • Each ban that is done with the command /mban, in a file called "banformat.json" will be saved the following data of the banned player:

  • Nick of the banned player.

  • IP of the banned player.

  • Reason why he was banned.

  • The day and time he was banned.

  • Nick of the admin/mod/guard/etc that gave ban him.

  • For how long was he banned.

To use the command you should only use command /checkban [ip], for example:

/checkban 233.233.122.23

IGN: MegaStar
Ban duration: 2 months
Reason: for being cool
Ban date: 2018/07/26 [20:35]
Banned by: MoDeR

Optional

  • Usually when someone bans a player with the command "/ban", in the global chat everyone can see the data of the ban, for example:

PabloEscobar was permabanned: esp/aimbot
MegaStar was banned for 999999 days, 19 hours, 59 minutes

  • In this script that can be configured, when you use the command "/mban" and you want that in the global chat nobody can see the data of the ban does and only show the message "was banned." for example: "MegaStar was banned", you must open the script and in line #19 "TOGGLE_GLOBAL_MESSAGE = True" you must change the True and set it False => TOGGLE_GLOBAL_MESSAGE = False

  • For default I have put it in False.

  • The /mban command can only be used within the game.

  • The command /checkban can be used within the game and through the console (run)

  • Make sure you download the file "banformat.json" and put it inside your dist folder (dist/banformat.json)

Any questions you have, just put your question on this topic, thank you.


banformat.json (4 Bytes)

helpban.py (9.45 KB)

VERY GOOD LOVE IT

Every day surprising more with your scripts, friend. :smiley:
(I feel special, thanks for including me in your post 8))