From 93897dfc4f8f63bb502f0ec95d6e880c6fbcf8df Mon Sep 17 00:00:00 2001 From: neon Date: Thu, 16 Jun 2022 21:17:35 +0100 Subject: [PATCH] limit message size --- Discord_UNLOZE/scripting/Discord_UNLOZE.sp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/Discord_UNLOZE/scripting/Discord_UNLOZE.sp b/Discord_UNLOZE/scripting/Discord_UNLOZE.sp index 2d57f673..c920d985 100644 --- a/Discord_UNLOZE/scripting/Discord_UNLOZE.sp +++ b/Discord_UNLOZE/scripting/Discord_UNLOZE.sp @@ -706,7 +706,7 @@ public void CallAdmin_OnReportPost(int client, int target, const char[] reason) } } - char sMessage[4096]; + char sMessage[1900]; if(ActiveAdmins) Format(sMessage, sizeof(sMessage), "```***ACTIVE ADMINS IN-GAME***``````\n%s - Tick: %d``````New report on server: %s (%s:%d)\nReportID: %d\nReporter: %s (%s)\nTarget: %s (%s)\nReason: %s\nJoin Server: steam://connect/%s:%d\nwhen in game, type !calladmin_handle %d or /calladmin_handle %d in chat to handle this report```", currentMap, GetGameTickCount(), sServerName, sServerIP, serverPort, g_iLastReportID, sClientName, sClientID, sTargetName, sTargetID, reason, sServerIP, serverPort, g_iLastReportID, g_iLastReportID); else @@ -728,7 +728,7 @@ public void CallAdmin_OnReportHandled(int client, int id) return; } - char sMessage[1024]; + char sMessage[1900]; Format(sMessage, sizeof(sMessage), "```Last report (%d) was handled by: %N```", g_iLastReportID, client); char sUsername[MAX_NAME_LENGTH]; @@ -751,7 +751,7 @@ public Action Oryx_OnTrigger(int client, int &level, char[] cheat) char sAuthID[32]; GetClientAuthId(client, AuthId_Steam2, sAuthID, sizeof(sAuthID), false); - char sMessage[4096]; + char sMessage[1900]; Format(sMessage, sizeof(sMessage), "```%s - Tick: %d``````NAME: %N\nSTEAMID: %s\nTRIGGER LEVEL: %i\n%s```", currentMap, GetGameTickCount(), client, sAuthID, level, cheat); if (g_sAvatarURL[client][0] != '\0') @@ -770,7 +770,7 @@ public void AntiBhopCheat_OnClientDetected(int client, char[] sReason, char[] sS char currentMap[64]; GetCurrentMap(currentMap, sizeof(currentMap)); - char sMessage[4096]; + char sMessage[1900]; Format(sMessage, sizeof(sMessage), "```%s - Tick: %d``````%s\n%s```", currentMap, GetGameTickCount(), sReason, sStats); if (g_sAvatarURL[client][0] != '\0') @@ -787,7 +787,7 @@ public void EW_OnClientRestricted(int client, int target, int length) char currentMap[64]; GetCurrentMap(currentMap, sizeof(currentMap)); - char sMessageTmp[4096]; + char sMessageTmp[1900]; if (length == -1) { @@ -803,7 +803,7 @@ public void EW_OnClientRestricted(int client, int target, int length) } - char sMessage[4096]; + char sMessage[1900]; Format(sMessage, sizeof(sMessage), "```%s - Tick: %d``````%s```", currentMap, GetGameTickCount(), sMessageTmp); if (g_sAvatarURL[target][0] != '\0') @@ -821,14 +821,14 @@ public void EW_OnClientUnrestricted(int client, int target) char currentMap[64]; GetCurrentMap(currentMap, sizeof(currentMap)); - char sMessageTmp[4096]; + char sMessageTmp[1900]; Format(sMessageTmp, sizeof(sMessageTmp), "%L got unrestricted by %L", target, client); - char sMessage[4096]; + char sMessage[1900]; Format(sMessage, sizeof(sMessage), "```%s - Tick: %d``````%s```", currentMap, GetGameTickCount(), sMessageTmp); if (g_sAvatarURL[target][0] != '\0') Discord_POST(DISCORD_ENTWATCH_WEBHOOKURL, sMessage, true, sUsername, true, g_sAvatarURL[target], false); else Discord_POST(DISCORD_ENTWATCH_WEBHOOKURL, sMessage, true, sUsername, false, "", false); -} +} \ No newline at end of file