Skip to content

Commit

Permalink
Update line should highlight to latest ddnet version
Browse files Browse the repository at this point in the history
  • Loading branch information
ChillerDragon committed Sep 16, 2024
1 parent 2245760 commit 18b8757
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/game/client/components/chillerbot/chathelper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -171,13 +171,13 @@ void CChatHelper::ConDeleteChatFilter(IConsole::IResult *pResult, void *pUserDat

bool CChatHelper::LineShouldHighlight(const char *pLine, const char *pName)
{
const char *pHL = str_find_nocase(pLine, pName);
const char *pHL = str_utf8_find_nocase(pLine, pName);

if(pHL)
{
int Length = str_length(pName);

if((pLine == pHL || pHL[-1] == ' ') && (pHL[Length] == 0 || pHL[Length] == ' ' || pHL[Length] == '.' || pHL[Length] == '!' || pHL[Length] == ',' || pHL[Length] == '?' || pHL[Length] == ':'))
if(Length > 0 && (pLine == pHL || pHL[-1] == ' ') && (pHL[Length] == 0 || pHL[Length] == ' ' || pHL[Length] == '.' || pHL[Length] == '!' || pHL[Length] == ',' || pHL[Length] == '?' || pHL[Length] == ':'))
return true;
}

Expand Down

0 comments on commit 18b8757

Please sign in to comment.