CallAdmin + Discord: adjust prints to discord

This commit is contained in:
Dogan
2019-10-22 19:19:21 +02:00
parent ed4a5595d2
commit 62b238dc86
2 changed files with 36 additions and 13 deletions
+3 -12
View File
@@ -56,22 +56,13 @@ public Action CallAdmin_OnDrawTarget(int client, int target)
//----------------------------------------------------------------------------------------------------
public Action CallAdmin_OnReportPre(int client, int target, const char[] reason)
{
bool ActiveAdmins = false;
int iLastReportID = CallAdmin_GetReportID();
for (int i = 1; i <= MaxClients; i++)
{
if (IsClientInGame(i) && (CheckCommandAccess(i, "", ADMFLAG_GENERIC, true)) && GetClientIdleTime(i) < g_iAdminAFKTime)
{
ActiveAdmins = true;
CPrintToChat(i, "{green}[CALLADMIN] {lightgreen}%N reported %N for %s.", client, target, reason);
}
CPrintToChat(i, "{green}[CALLADMIN] {lightgreen}%N reported %N for %s. Type {red}/calladmin_handle %d{lightgreen} in chat to handle this report.", client, target, reason, iLastReportID + 1);
}
if(ActiveAdmins)
{
CPrintToChat(client, "{green}[CALLADMIN] {lightgreen}Reported %N for %s.", target, reason);
return Plugin_Handled;
}
else
return Plugin_Continue;
return Plugin_Continue;
}