Implemented amb307 - admincmd now caches a few of the last connections.

amx_addban changed back to ADMIN_BAN.  Users without RCON access will only be able to ban those in the old connection cache.  Users with RCON access still have unrestricted access to amx_addban.

The old connection cache can be viewed with amx_last (ADMIN_BAN access required by default).
This commit is contained in:
Steve Dudenhoeffer
2007-08-03 15:26:22 +00:00
parent b09bf4c532
commit 15b62648c9
2 changed files with 246 additions and 7 deletions

View File

@ -33,7 +33,7 @@ stock is_user_admin(id)
return (__flags>0 && !(__flags&ADMIN_USER));
}
stock cmd_access(id,level,cid,num)
stock cmd_access(id, level, cid, num, bool:accesssilent = false)
{
new has_access = 0;
if ( id==(is_dedicated_server()?0:1) )
@ -58,11 +58,14 @@ stock cmd_access(id,level,cid,num)
if ( has_access==0 )
{
if (!accesssilent)
{
#if defined AMXMOD_BCOMPAT
console_print(id, SIMPLE_T("You have no access to that command."));
console_print(id, SIMPLE_T("You have no access to that command."));
#else
console_print(id,"%L",id,"NO_ACC_COM");
console_print(id,"%L",id,"NO_ACC_COM");
#endif
}
return 0;
}
if (read_argc() < num)