update to send messages about ban avoiders
This commit is contained in:
parent
ad01aee1b3
commit
ade335943b
@ -16,6 +16,7 @@
|
|||||||
#tryinclude <calladmin>
|
#tryinclude <calladmin>
|
||||||
#tryinclude <oryx>
|
#tryinclude <oryx>
|
||||||
#tryinclude <entWatch_restrictions>
|
#tryinclude <entWatch_restrictions>
|
||||||
|
#tryinclude <jenz_ban_detector>
|
||||||
|
|
||||||
#pragma newdecls required
|
#pragma newdecls required
|
||||||
|
|
||||||
@ -660,6 +661,26 @@ public Action OnClientSayCommand(int client, const char[] sCommand, const char[]
|
|||||||
return Plugin_Continue;
|
return Plugin_Continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void BanDetectorPost(int client, const char[] detected_sourceban)
|
||||||
|
{
|
||||||
|
char sClientName[MAX_NAME_LENGTH];
|
||||||
|
char sClientID[21];
|
||||||
|
GetClientName(client, sClientName, sizeof(sClientName));
|
||||||
|
GetClientAuthId(client, AuthId_Steam2, sClientID, sizeof(sClientID));
|
||||||
|
char currentMap[64];
|
||||||
|
GetCurrentMap(currentMap, sizeof(currentMap));
|
||||||
|
char sMessage[1900];
|
||||||
|
char sAuthID64[32];
|
||||||
|
if (!Steam32IDtoSteam64ID(sClientID, sAuthID64, sizeof(sAuthID64)))
|
||||||
|
return;
|
||||||
|
|
||||||
|
Format(sMessage, sizeof(sMessage), "https://steamcommunity.com/profiles/%s\nName: %s\nSteamID: %s\nClient is ban avoiding the ban: https://bans.unloze.com/index.php?p=banlist&searchText=%s&Submit=Search ", sAuthID64, sClientName, sClientID, detected_sourceban);
|
||||||
|
if (g_sAvatarURL[client][0] != '\0')
|
||||||
|
Discord_POST(DISCORD_BAN_DETECTOR, sMessage, true, sClientName, true, g_sAvatarURL[client], false);
|
||||||
|
else
|
||||||
|
Discord_POST(DISCORD_BAN_DETECTOR, sMessage, true, sClientName, false, "", false);
|
||||||
|
}
|
||||||
|
|
||||||
public void CallAdmin_OnReportPost(int client, int target, const char[] reason)
|
public void CallAdmin_OnReportPost(int client, int target, const char[] reason)
|
||||||
{
|
{
|
||||||
char sClientName[MAX_NAME_LENGTH];
|
char sClientName[MAX_NAME_LENGTH];
|
||||||
@ -831,4 +852,4 @@ public void EW_OnClientUnrestricted(int client, int target)
|
|||||||
Discord_POST(DISCORD_ENTWATCH_WEBHOOKURL, sMessage, true, sUsername, true, g_sAvatarURL[target], false);
|
Discord_POST(DISCORD_ENTWATCH_WEBHOOKURL, sMessage, true, sUsername, true, g_sAvatarURL[target], false);
|
||||||
else
|
else
|
||||||
Discord_POST(DISCORD_ENTWATCH_WEBHOOKURL, sMessage, true, sUsername, false, "", false);
|
Discord_POST(DISCORD_ENTWATCH_WEBHOOKURL, sMessage, true, sUsername, false, "", false);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user