On Sun, 26 Feb 2006, devin812 wrote:
> Message: 5
> Date: Sat, 25 Feb 2006 18:02:46 +0100 (CET)
> From: kama <[EMAIL PROTECTED]>
> To: [email protected]
> Subject: Re: [hlds_linux] Player had admin access using AMXMOD, shouldn't
> have
> Reply-To: [email protected]
>
>
> Its default behaviour of amxmod. sending a combination of @ as teamsay or
> say can make all user send an amx_chat. Never the less. If they are not
> admins they will not see the message.
>
> /Bjorn
>
> =================================================
> Can you clarify this statement, this would make sense, but I wasn't aware of
> this usage.
This is from amxmod 0.9.9 and may differ in amxx.. I hope it clear things
out...
first it register the command with the restriction of '0', which is any
user.
register_clcmd("say_team","cmdSayAdmin",0,_T("@<text> - displays message to
admins"))
The code that handle it. all comments with // is made by me...
public cmdSayAdmin(id) {
new said[2]
// read the first char from the line...
read_argv(1,said,1)
// check if we have @ as the first char or not
if (said[0]!='@') return PLUGIN_CONTINUE
new message[192], /*message2[192],*/ name[32],authid[32], userid
new players[32], inum
// read the whole line
read_argv(1,message,191)
get_user_authid(id,authid,31)
get_user_name(id,name,31)
userid = get_user_userid(id)
log_to_file(g_logFile,"Chat: ^"%s<%d><%s><>^" chat
^"%s^"",name,userid,authid,message[1])
log_message("^"%s<%d><%s><>^" triggered ^"amx_chat^" (text
^"%s^")",name,userid,authid,message[1])
// Loop through all players and check if they are admins (ADMIN_CHAT) and
// print it to them
get_players(players,inum)
for(new i=0; i<inum; ++i){
if (players[i] != id && get_user_flags(players[i]) & ADMIN_CHAT)
client_print(players[i],print_chat,_T("(ADMINS) %s :
%s"),name,message[1])
}
// Let the user see what he has printed
client_print(id,print_chat,message)
return PLUGIN_HANDLED
}
/Bjorn
_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please
visit:
http://list.valvesoftware.com/mailman/listinfo/hlds_linux