Monthly Target: $400 Donations: $147
 36% 

[Any] Limit Ban Duration v1.0.2 (Updated: 4/23/12)


Post New Thread Reply   
 
Thread Tools Display Modes
Author
thetwistedpanda
Good Little Panda
Join Date: Sep 2008
Plugin ID:
2919
Plugin Version:
1.0.2
Plugin Category:
General Purpose
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
    33 
    Plugin Description:
    Provides functionality for creating restrictions on ban lengths.
    Old 04-20-2012 , 23:45   [Any] Limit Ban Duration v1.0.2 (Updated: 4/23/12)
    Reply With Quote #1

    Description:
    • If you've ever needed to limit the amount of time a player can ban for, this plugin is for you! As the name entails, it provides the ability to restrict players from using ban lengths based on an override/flag combination.
    • However, it's currently not possible for a plugin to edit entries within the sm_admin menu, so this plugin isn't capable of forcing menu restrictions without editing the corresponding plugin. As such, I've attached pre-edited versions of basebans.smx (v1.4.2) and sourcebans.smx (v1.4.9) that have been modified to obey Limit Ban Duration restrictions, if you wish to use them. If you do not wish to use them, only the sm_ban command will fall under this plugin's restrictions.
    Features:
    • Provides a command listener for the sm_ban command, supporting Sourcemod's default basebans as well as Sourcebans.
    • Provides four natives for usage with other plugins, mainly for adding functionality to basebans/sourcebans.
      • LimitBan_GetSize - Returns the current number of defined ban lengths.
      • LimitBan_GetDisplay - Provides access to the word form of defined ban lengths.
      • LimitBan_GetAccess - Returns permission for a specified ban length index.
      • LimitBan_GetLength - Returns the number of minutes for a specified ban length index.
    • The configuration file sm_limit_ban_durations.ini allows you to define your own ban lengths (in minutes), and restrict them to custom overrides/flags.
      • These times will also be the only available times for the ban entry within sm_admin, provided you're using a modified sourcebans/basebans below.
    • 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.
    ConVars:
    • 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.
    Installation:
    • /sourcemod/scripting/sm_limit_ban_duration.sp
    • /sourcemod/scripting/include/sm_limit_ban_duration.inc
    • /sourcemod/plugins/sm_limit_ban_duration.smx
    • /sourcemod/translations/sm_limit_ban_duration.phrases.txt
    • /sourcemod/configs/sm_limit_ban_duration.ini
    • If you wish to have Limit Ban Duration functionality applied to the ban option in sm_admin, you will need to use one of these modified versions. The plugin will automatically move your existing basebans.smx/sourcebans.smx into the /disabled/ folder, so you merely have to upload them to the correct directory. Only upload the one you need! (lbd_basebans to replace the default basebans, or lbd_sourcebans to replace sourcebans)
      • /sourcemod/plugins/lbd_basebans.smx
      • /sourcemod/plugins/lbd_sourcebans.smx
    Pre-Download Config Example:
    Spoiler
    Attached Files
    File Type: txt sm_limit_ban_duration.phrases.txt (856 Bytes, 365 views)
    File Type: ini sm_limit_ban_duration.ini (3.2 KB, 352 views)
    File Type: smx sm_limit_ban_duration.smx (9.8 KB, 225 views)
    File Type: sp Get Plugin or Get Source (sm_limit_ban_duration.sp - 147 views - 12.5 KB)
    File Type: sp Get Plugin or Get Source (lbd_basebans.sp - 113 views - 16.6 KB)
    File Type: sp Get Plugin or Get Source (lbd_sourcebans.sp - 161 views - 67.5 KB)
    File Type: smx lbd_basebans.smx (10.5 KB, 151 views)
    File Type: smx lbd_sourcebans.smx (29.4 KB, 158 views)
    File Type: inc sm_limit_ban_duration.inc (2.0 KB, 192 views)
    __________________

    Last edited by thetwistedpanda; 04-23-2012 at 16:25.
    thetwistedpanda is offline
    fron
    Junior Member
    Join Date: Apr 2012
    Location: Earth
    Old 04-21-2012 , 04:46   Re: [Any] Limit Ban Duration
    Reply With Quote #2

    You can do so on the menu is not displayed on the time of the ban that does not have permission?
    fron is offline
    thetwistedpanda
    Good Little Panda
    Join Date: Sep 2008
    Old 04-21-2012 , 08:34   Re: [Any] Limit Ban Duration
    Reply With Quote #3

    The menu shouldn't be appearing if they do not have permission, could you post your cfg so I could attempt to replicate? Or are you referring to the sm_admin menu? If the latter, I'll have to write up two modified versions of basebans/sourcebans that support this plugin. I never use the admin menu and I completely forgot it existed when writing this plugin.
    __________________

    Last edited by thetwistedpanda; 04-21-2012 at 10:10.
    thetwistedpanda is offline
    fron
    Junior Member
    Join Date: Apr 2012
    Location: Earth
    Old 04-21-2012 , 10:46   Re: [Any] Limit Ban Duration
    Reply With Quote #4

    Yes I mean the sm_admin menu.
    fron is offline
    fron
    Junior Member
    Join Date: Apr 2012
    Location: Earth
    Old 04-21-2012 , 10:59   Re: [Any] Limit Ban Duration
    Reply With Quote #5

    You checked this plugin?
    fron is offline
    thetwistedpanda
    Good Little Panda
    Join Date: Sep 2008
    Old 04-21-2012 , 15:34   Re: [Any] Limit Ban Duration
    Reply With Quote #6

    Yeah about that... I never use the admin menu and completely forgot it existed when writing this. The next update (tonight? tomorrow night?) will come with pre-modified versions of basebans and sourcebans that are compatible with this plugin. I had hoped that it wouldn't be necessary, but alas, the menu can't be hooked.
    __________________

    Last edited by thetwistedpanda; 04-21-2012 at 17:52.
    thetwistedpanda is offline
    thetwistedpanda
    Good Little Panda
    Join Date: Sep 2008
    Old 04-21-2012 , 17:52   Re: [Any] Limit Ban Duration v1.0.1 (Updated: 4/21/12)
    Reply With Quote #7

    Version 1.0.1 Released
    • Added the following natives:
      • LimitBan_GetSize - Returns the current number of defined ban lengths.
      • LimitBan_GetDisplay - Provides access to the word form of defined ban lengths.
      • LimitBan_GetAccess - Returns permission for a specified ban length index.
      • LimitBan_GetLength - Returns the number of minutes for a specified ban length index.
    • The sm_limit_ban_duration.ini has received a "display" parameter, allowing 10080 to turn into "7 Days"/"One Week" for menu usage.
    • Removed left over debug printing from plugin.
    • Removed requirement for sourcebans.inc to recompile.
    • Added requirement of sm_limit_ban_duration to recompile.
    I've attached lbd_basebans.smx and lbd_sourcebans.smx (as well as their source). These files have been modified to have support from Limit Ban Duration (specifically, they've been modified so the ban option in sm_admin obeys the restrictions placed by Limit Ban Duration). You are not required to use one of these, but without them, players can simply ignore the restrictions on sm_ban by using the menu.
    __________________

    Last edited by thetwistedpanda; 04-21-2012 at 17:57.
    thetwistedpanda is offline
    Horsedick
    AlliedModders Donor
    Join Date: Sep 2011
    Old 04-21-2012 , 18:00   Re: [Any] Limit Ban Duration v1.0.1 (Updated: 4/21/12)
    Reply With Quote #8

    Nice additions panda... I was looking to have to edit some things to make something similar to this effect so I will likely be running this and testing in the near future.
    Horsedick is offline
    Gisele
    Junior Member
    Join Date: Apr 2012
    Location: Spain
    Old 04-22-2012 , 00:08   Re: [Any] Limit Ban Duration v1.0.1 (Updated: 4/21/12)
    Reply With Quote #9

    Hola, tengo un problema con este plugin, los baneos por comandos de chat (sm_ban/!ban "steamid" "0") los pueden aplicar todo tipo de administradores tengan el flag que tengan, pueden banear indefinidamente si lo hacen via chat/consola, hay alguna forma posible de evitar que esto ocurra?, muchas gracias. Saludos^^.
    Gisele is offline
    thetwistedpanda
    Good Little Panda
    Join Date: Sep 2008
    Old 04-22-2012 , 00:28   Re: [Any] Limit Ban Duration v1.0.1 (Updated: 4/21/12)
    Reply With Quote #10

    This is an english forum, do try using it otherwise you won't get a response (unless someone happens to understand you).
    __________________
    thetwistedpanda is offline
    Reply


    Thread Tools
    Display Modes

    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is On
    HTML code is Off

    Forum Jump


    All times are GMT -4. The time now is 02:39.


    Powered by vBulletin®
    Copyright ©2000 - 2017, vBulletin Solutions, Inc.
    Theme made by Freecode