diff --git a/_entWatch4/scripting/entWatch-restrictions.sp b/_entWatch4/scripting/entWatch-restrictions.sp index 6aa919c2..1b6e7382 100644 --- a/_entWatch4/scripting/entWatch-restrictions.sp +++ b/_entWatch4/scripting/entWatch-restrictions.sp @@ -69,6 +69,8 @@ public void OnPluginStart() RegAdminCmd("sm_eban", Command_ClientRestrict, ADMFLAG_BAN); RegAdminCmd("sm_eunban", Command_ClientUnrestrict, ADMFLAG_UNBAN); + + RegConsoleCmd("sm_restrictions", Command_DisplayRestrictions); } //---------------------------------------------------------------------------------------------------- @@ -157,6 +159,38 @@ public Action Command_ClientUnrestrict(int client, int args) return Plugin_Handled; } +//---------------------------------------------------------------------------------------------------- +// Purpose: +//---------------------------------------------------------------------------------------------------- +public Action Command_DisplayRestrictions(int client, int args) +{ + char aBuf[1024]; + char aBuf2[MAX_NAME_LENGTH]; + + for(int i = 1; i <= MaxClients; i++) + { + if(IsClientInGame(i) && !IsFakeClient(i)) + { + if(ClientRestricted(i)) + { + GetClientName(i, aBuf2, sizeof(aBuf2)); + StrCat(aBuf, sizeof(aBuf), aBuf2); + StrCat(aBuf, sizeof(aBuf), ", "); + } + } + } + + if(strlen(aBuf)) + { + aBuf[strlen(aBuf) - 2] = 0; + ReplyToCommand(client, "[SM] Currently restricted clients: %s", aBuf); + } + else + ReplyToCommand(client, "[SM] Currently restricted clients: none"); + + return Plugin_Handled; +} + //---------------------------------------------------------------------------------------------------- // Purpose: //----------------------------------------------------------------------------------------------------