[Any] Limit Ban Duration


  • If you've ever needed to restrict the time a player can ban for using sm_ban, this plugin is for you! As the plugin name entails, this provides the ability to restrict players from using ban lengths based on overrides/flags.

  • Note: Please note that due to the nature of the plugin, extensive testing is unfeasible. While initial tests ran fine and no errors occurred, I cannot guarantee this plugin is 100% bug free until I'm able to see it in action for an extended period of time.


  • Provides a command listener for the sm_ban command that supporting both SourceMod's default sm_ban as well as SourceBans.

  • The provided configuration file allows you to define your own ban lengths (in minutes), and restrict them to custom overrides/flags.

  • Using the feature sm_limit_ban_duration_reduce, ban lengths that are above what an admin has access to will automatically be lowered to the closest ban length that they do possess.
    • This feature will also take a permanent punishment and lower it to the highest length the admin has, if the admin doesn't have perm access.

  • Using the feature sm_limit_ban_duration_maximum, admins will not be able to ban for any longer than the highest defined entry in the configuration file.
    • For example, if this is enabled with the default configuration, a player may not ban for more than 4 weeks, aside from permanently.

    • This feature can be combined with sm_limit_ban_duration_reduce to automatically lower a ban length to the maximum allowed.

  • If a user tries to issue a ban and doesn't have permission to use any defined lengths, the plugin will simply tell them they do not have access to the command.


  • sm_limit_ban_duration_enabled - Enables/disables all features of this plugin.

  • sm_limit_ban_duration_reduce - If enabled, the plugin will lower ban lengths if an admin doesn't have access to their specified length to a length they do possess.

  • sm_limit_ban_duration_maximum - If enabled, the highest entry defined in the plugins configuration file will be the highest amount any admin can ban for.


  • /sourcemod/scripting/sm_limit_ban_duration.sp

  • /sourcemod/plugins/sm_limit_ban_duration.smx

  • /sourcemod/translations/sm_limit_ban_duration.phrases.txt

  • /sourcemod/configs/sm_limit_ban_duration.ini

Pre-Download Config Example:


PHP Code:

"override"    ""
        "flags"     ""
"override"    "Basic_Admin"
        "flags"        "b"
"override"    ""
      &n bsp; "flags"        ""
"override"    "High_Admin"
        "flags"        "e"
"override"    "High_Admin"
        "flags"        "e"
"override"    "Limit_Perm_Ban"
        "flags"        "z"

Attached Files

File Type: sp

Get Plugin or
Get Source (sm_limit_ban_duration.sp - 10.9 KB)

File Type: txt

sm_limit_ban_duration.phrases.txt (856 Bytes)

File Type: ini

sm_limit_ban_duration.ini (2.5 KB)

File Type: smx

sm_limit_ban_duration.smx (9.1 KB)

Orignal From: [Any] Limit Ban Duration

No comments

Not a single link is allowed to submit in comment :o