Fix formatting for server chat messages with time in already

This commit is contained in:
def 2017-08-21 20:48:11 +02:00
parent 98520bb407
commit 0e1cc205ef

View file

@ -2917,10 +2917,15 @@ void CGameContext::SendChatResponse(const char *pLine, void *pUser, bool Highlig
return;
ReentryGuard++;
if(*pLine == '[')
do
pLine++;
while((pLine - 2 < pLineOrig || *(pLine - 2) != ':') && *pLine != 0); // remove the category (e.g. [Console]: No Such Command)
if(pLine[0] == '[')
{
// Remove time and category: [20:39:00][Console]
pLine = str_find(pLine, "]: ");
if(pLine)
pLine += 3;
else
pLine = pLineOrig;
}
pSelf->SendChatTarget(ClientID, pLine);