Maximum ban time
I was wondering if it is possible to limit how long an admin group could ban for. We want to setup a custom admin group through sourcebans that would allow us to restrict that group of admins to only be able to ban for a maximum of 1 hour at a time. Is this possible and if so how would I go about doing it?
We also want this to only effect that admin group and not the other groups that we have setup. |
Re: Maximum ban time
I actually wanted to do this myself, and I am pretty sure it's possible to make as a separate plugin, but it's not currently built-in into Sourcemod.
P.S: On a side note, I wanted to do this about a month ago but turned out giving up on it, and just gave my admins perma banning ability. |
Re: Maximum ban time
just alter basebans and make a new plugin from it, customizing it to only be max 60 minutes for a certain group...
|
Re: Maximum ban time
I'll write up a quick plugin tomorrow using AddCommandListener to impliement this functionality without requiring a modified basechat/sourcebans. I'd do it tonight but i'll be losing power any minute now from these pesky storms :(.
|
Re: Maximum ban time
That sound awesome can't wait to see what you come up with the solve this little dilemma
|
Re: Maximum ban time
I have one that works for the command sm_ban, but you'll need to tweak the adminmenu so the admins cannot use the menu to ban for longer than n minutes.
Basically, something like this should do it - but like I said, I was still able to pull up my adminmenu (which I didn't alter) and use that ban menu: PHP Code:
|
Re: Maximum ban time
So this should work along side sourcebans and limit anyone without ADMFLAG_CUSTOM4 to a max of 1 hour bans once i make custom a custom admin menu and remove some time limits, and is there a way to add another section to that that would say allow a certain flag have 60 min bans max, ADMFLAG_CUSTOM3 1 week bans max, and keep ADMFLAG_CUSTOM4 keep perm bans so I could have 3 different groups with 3 different time limits?
|
Re: Maximum ban time
I don't have, nor have I used, sourcebans... as long as sourcebans works with the sm_ban command, this will work - in effect, it looks at the arguments of the sm_ban command, specifically the time element, and adjusts it if it's out of acceptable range. The above can be enhanced to have CVars where you can define the time limits.
|
Re: Maximum ban time
It does work along side sourcebans perfectly as long as you use /ban from chat but the admin menu still bans. Is there a way that you could set it up to also keep it from allowing the bans to be placed through the admin menu or will I have to make a custom one no matter what? and could you set it up to have cvar access (cfg file) so i could define which flag would have which time limit say something like this with say 6 different sm_limitban1-6 so there could be up to 6 different groups.
// This file was auto-generated by SourceMod (v1.4.1) // ConVars for plugin "sm_limitban.smx" // Select which flag and time you would like to set (which flag and time in minutes) // Ex. "ADMFLAG_CUSTOM1,60" sm_limitban1 "ADMFLAG_CUSTOM1,60" // Select which flag and time you would like to set (which flag and time in minutes) // Ex. "ADMFLAG_CUSTOM2,60" sm_limitban2 "ADMFLAG_CUSTOM2,120" // Select which flag and time you would like to set (which flag and time in minutes) // Ex. "ADMFLAG_CUSTOM4,60" sm_limitban3 "ADMFLAG_CUSTOM4,0" |
Re: Maximum ban time
2 Attachment(s)
You can't block the banning via admin menu without modifying the sourcecode of sourcebans.
This plugin could handle the command banning or some other kind of ban via a different plugin, but since sourcebans adds the bans to it's database simultaneously to calling BanClient, blocking the OnBanClient forward doesn't help here. Sourcebans always bans for 5 minutes locally, so one can't check the time in that callback anyways. Put the bantimelimit.cfg in your sourcemod/configs folder. I didn't test it, but as said, you'd need to modify sourcebans intially to limit the ban times properly:( |
All times are GMT -4. The time now is 18:40. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.