AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Suggestions / Requests (https://forums.alliedmods.net/forumdisplay.php?f=12)
-   -   [REQ]Block cvar comands (https://forums.alliedmods.net/showthread.php?t=276426)

bojka 12-21-2015 06:20

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

Mordekay 12-21-2015 07:06

Re: [REQ]Block cvar comands
 
Simply don't give an admin you don't trust the flag to use this command.

fysiks 12-21-2015 19:08

Re: [REQ]Block cvar comands
 
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.

addons_zz 12-21-2015 22:28

Re: [REQ]Block cvar comands
 
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.


All times are GMT -4. The time now is 04:09.

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