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

[REQ]Block cvar comands


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
bojka
Junior Member
Join Date: Dec 2015
Old 12-21-2015 , 06:20   [REQ]Block cvar comands
Reply With Quote #1

Hi , can anyone show me how to block cvar comands example an code to block amx_cvar rcon_password.

Last edited by bojka; 12-21-2015 at 06:32.
bojka is offline
Mordekay
Squirrel of Fortune
Join Date: Apr 2006
Location: Germany
Old 12-21-2015 , 07:06   Re: [REQ]Block cvar comands
Reply With Quote #2

Simply don't give an admin you don't trust the flag to use this command.
__________________

Mordekay is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 12-21-2015 , 19:08   Re: [REQ]Block cvar comands
Reply With Quote #3

Setting the rcon password via amx_cvar requires rcon access. Don't give them rcon access.

If you want to give certain people access to specific cvars then I'd suggest requesting a plugin that has commands that change the cvars. The commands can then be individually set to a specific flag and you can add that flag to the admins in users.ini.
__________________

Last edited by fysiks; 12-21-2015 at 19:19.
fysiks is offline
addons_zz
Veteran Member
Join Date: Aug 2015
Location: Dreams, zz
Old 12-21-2015 , 22:28   Re: [REQ]Block cvar comands
Reply With Quote #4

admincmd.sma

Code:
public plugin_cfg() {     // Cvars which can be changed only with rcon access     server_cmd(g_addCvar, "rcon_password")     server_cmd(g_addCvar, "amx_show_activity")     server_cmd(g_addCvar, "amx_mode")     server_cmd(g_addCvar, "amx_password_field")     server_cmd(g_addCvar, "amx_default_access")     server_cmd(g_addCvar, "amx_reserved_slots")     server_cmd(g_addCvar, "amx_reservation")     server_cmd(g_addCvar, "amx_sql_table");     server_cmd(g_addCvar, "amx_sql_host");     server_cmd(g_addCvar, "amx_sql_user");     server_cmd(g_addCvar, "amx_sql_pass");     server_cmd(g_addCvar, "amx_sql_db");     server_cmd(g_addCvar, "amx_sql_type"); }

You can re-edit and recompile your "admincmd.sma" and change the line:

Code:
Line 688:   if (equal(arg, "add") && (get_user_flags(id) & ADMIN_RCON))

To:
Code:
Line 688:   if (equal(arg, "add") && (get_user_flags(id) & ADMIN_IMMUNITY))
Then only immune admins can use it.
__________________
Plugin: Sublime Text - ITE , Galileo
Multi-Mod: Manager / Plugin / Server

Support me on Patreon, Ko-fi, Liberapay or Open Collective

Last edited by addons_zz; 12-22-2015 at 19:34. Reason: spelling fixes
addons_zz is offline
Reply



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 19:32.


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