AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [Any] Limit Ban Duration v1.0.2 (Updated: 4/23/12) (https://forums.alliedmods.net/showthread.php?t=183355)

thetwistedpanda 04-20-2012 22:45

[Any] Limit Ban Duration v1.0.2 (Updated: 4/23/12)
 
20 Attachment(s)
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

fron 04-21-2012 03:46

Re: [Any] Limit Ban Duration
 
You can do so on the menu is not displayed on the time of the ban that does not have permission?

thetwistedpanda 04-21-2012 07:34

Re: [Any] Limit Ban Duration
 
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.

fron 04-21-2012 09:46

Re: [Any] Limit Ban Duration
 
Yes I mean the sm_admin menu.

fron 04-21-2012 09:59

Re: [Any] Limit Ban Duration
 
You checked this plugin?

thetwistedpanda 04-21-2012 14:34

Re: [Any] Limit Ban Duration
 
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.

thetwistedpanda 04-21-2012 16:52

Re: [Any] Limit Ban Duration v1.0.1 (Updated: 4/21/12)
 
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.

Horsedick 04-21-2012 17:00

Re: [Any] Limit Ban Duration v1.0.1 (Updated: 4/21/12)
 
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.

Gisele 04-21-2012 23:08

Re: [Any] Limit Ban Duration v1.0.1 (Updated: 4/21/12)
 
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^^.

thetwistedpanda 04-21-2012 23:28

Re: [Any] Limit Ban Duration v1.0.1 (Updated: 4/21/12)
 
This is an english forum, do try using it otherwise you won't get a response (unless someone happens to understand you).


All times are GMT -4. The time now is 08:16.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.