AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   howto disable rcon_password use? (https://forums.alliedmods.net/showthread.php?t=85416)

xlenonz 02-10-2009 03:46

howto disable rcon_password use?
 
hi ,

i want disable rcon_password use.

admins cant use rcon_password , i want that.
so

i must edit admincmd.sma and
if arg rcon_password , reject that.

arg variable come with , "rcon_password abc" < this type how to i reject that ?
PHP Code:

public cmdRcon(idlevelcid)
{
    if (!
cmd_access(idlevelcid2))
        return 
PLUGIN_HANDLED
    
    
new arg[128], authid[32], name[32]
    
    
read_args(arg127)
    
get_user_authid(idauthid31)
    
get_user_name(idname31)
    
log_amx("Cmd: ^"%s<%d><%s><>^" server console (cmdline ^"%s^")"nameget_user_userid(id), authidarg)
    
    
console_print(id"[AMXX] %L"id"COM_SENT_SERVER"arg)
    
server_cmd("%s"arg)
    
    return 
PLUGIN_HANDLED



jim_yang 02-10-2009 03:50

Re: howto disable rcon_password use?
 
add this after read_args(arg, 127)
Code:

if ( contain(arg, "rcon_password") != -1 )
    return PLUGIN_HANDLED


xlenonz 02-10-2009 04:02

Re: howto disable rcon_password use?
 
thanks , now disable.

Owyn 02-10-2009 05:48

Re: howto disable rcon_password use?
 
just type rcon_password "" in server console and rcon won't be used. or remove L flag from admin access

xlenonz 02-10-2009 11:12

Re: howto disable rcon_password use?
 
i use webmod for servers use rcon, and admins need L flag and admins dont change password so i need that :)


All times are GMT -4. The time now is 17:01.

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