Merge pull request #8791 from ChillerDragon/pr_censor_save_code_fix

Fix save code not being censored in streamer mode
This commit is contained in:
Dennis Felsing 2024-08-23 11:39:36 +00:00 committed by GitHub
commit 37fd57ccb8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -992,7 +992,11 @@ void CChat::OnPrepareLines(float y)
const char *pText = Line.m_aText;
if(Config()->m_ClStreamerMode && Line.m_ClientId == SERVER_MSG)
{
if(str_startswith(Line.m_aText, "Team save in progress. You'll be able to load with '/load") && str_endswith(Line.m_aText, "if it fails"))
if(str_startswith(Line.m_aText, "Team save in progress. You'll be able to load with '/load ") && str_endswith(Line.m_aText, "'"))
{
pText = "Team save in progress. You'll be able to load with '/load ***'";
}
else if(str_startswith(Line.m_aText, "Team save in progress. You'll be able to load with '/load") && str_endswith(Line.m_aText, "if it fails"))
{
pText = "Team save in progress. You'll be able to load with '/load ***' if save is successful or with '/load *** *** ***' if it fails";
}