Raised This Month: $12 Target: $400
 3% 

[CS:GO] Block all comands using sm_cvar except certain ones


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Lannister
Veteran Member
Join Date: Apr 2015
Old 06-20-2020 , 19:35   [CS:GO] Block all comands using sm_cvar except certain ones
Reply With Quote #1

Hello!

I was wondering if someone could make a plugin that would block all the commands that requiere sm_cvar and to allow just the ones that i put on a whitelist cfg, the idea behind this is that i've seen some admins in my server touching some cvars that they shouldn't change, just because "they found the plugin on Alliedmodder and they saw the cvar", so the idea behind this is to prevent admins from damaging my server (without me knowing it)

I've tried to use the search function but i couldn't find anything, basically the plugin should block all cvars except the ones that i put on a white list cfg

Hopefuly i explained myself well, thanks in advance!
Lannister is offline
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Old 06-20-2020 , 19:42   Re: [CS:GO] Block all comands using sm_cvar except certain ones
Reply With Quote #2

Remove their "cvars" - "h" flag?

Not sure if a plugin like that exists. Should be easy enough to right, hopefully someone can, I don't have time to.
__________________
Silvers is offline
Lannister
Veteran Member
Join Date: Apr 2015
Old 06-20-2020 , 20:42   Re: [CS:GO] Block all comands using sm_cvar except certain ones
Reply With Quote #3

Quote:
Originally Posted by Silvers View Post
Remove their "cvars" - "h" flag?

Not sure if a plugin like that exists. Should be easy enough to right, hopefully someone can, I don't have time to.
I want to have them using some few commands that requiere the sm_cvar behind, such as sm_cvar mp_restartgame 1, and normal stuff like that, but i want to block ALL the other cvars (from plugins) that can be changed using the sm_cvar command

For example, on Zephyrus store, if some admin uses sm_cvar sm_store_credit_amount_active "99999" then he'll fuck up all my database, i'm not saying that they will do this, but, they CAN do it if they want (same with all the other cvars from others plugins)

And thanks for the reply! hopefuly someone can do this, and i feel that this may be useful for many other server operators!

EDIT: I was thinking about removing the "h" flag to them (cvar flag) and add on admin_override for example, sm_cvar mp_restartgame "b" but i'm sure that won't work, also the flag "h" says "Change most cvars." does this mean, cvars from plugins? i need to test it

Last edited by Lannister; 06-20-2020 at 20:45.
Lannister is offline
DarkDeviL
SourceMod Moderator
Join Date: Apr 2012
Old 06-22-2020 , 07:54   Re: [CS:GO] Block all comands using sm_cvar except certain ones
Reply With Quote #4

Create a very simple plugin, with e.g. a command like "sm_restartgame" that sends "mp_restartgame 1" as ServerCommand().

That way, you can override and restrict sm_restartgame (and any of the other commands you make) to a specific level, and be sure that no one can touch the server's settings with either sm_cvar or sm_rcon.

If you're attempting (and even seem to be succeeding) with restricting sm_cvar or sm_rcon to certain functionality, you might be overlooking something else that can cause similar consequences as messing up your database.

So if this is really what you are looking for, making people have access to one thing such as e.g. "mp_restartgame 1", but not certain other things, make a separate command for that particular thing, and educate your 'admins' to use that new functionality instead of sm_cvar/sm_rcon.
__________________
Mostly known as "DarkDeviL".

Dropbox FastDL: Public folder will no longer work after March 15, 2017!
For more info, see the [SRCDS Thread], or the [HLDS Thread].
DarkDeviL 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 08:18.


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