Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion addons/sourcemod/scripting/ConsoleChatManager.sp
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ enum EHudNotify
}

#define MAXLENGTH_INPUT 512
#define MAXLENGTH_SAYTEXT2 249
#define NORMALHUD 1

ConVar g_ConsoleMessage, g_EnableTranslation, g_cRemoveConsoleTag;
Expand Down Expand Up @@ -78,7 +79,7 @@ public Plugin myinfo =
name = "ConsoleChatManager",
author = "Franc1sco Steam: franug, maxime1907, inGame, AntiTeal, Oylsister, .Rushaway, tilgep, koen",
description = "Interact with console messages",
version = "2.4.5",
version = "2.4.6",
url = ""
};

Expand Down Expand Up @@ -883,6 +884,12 @@ stock void SendServerMessage(const char[] sMessage, bool bScript = false)
FormatEx(sFinalText, sizeof(sFinalText), "%s%s", sFinalText, roundTimeText);
}

// Overflow protection
if (MAXLENGTH_SAYTEXT2 - strlen(sFinalText) <= 1)
{
return;
}

CPrintToChat(i, sFinalText);

// Prepare HUD message
Expand Down