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; return;
ReentryGuard++; ReentryGuard++;
if(*pLine == '[') if(pLine[0] == '[')
do {
pLine++; // Remove time and category: [20:39:00][Console]
while((pLine - 2 < pLineOrig || *(pLine - 2) != ':') && *pLine != 0); // remove the category (e.g. [Console]: No Such Command) pLine = str_find(pLine, "]: ");
if(pLine)
pLine += 3;
else
pLine = pLineOrig;
}
pSelf->SendChatTarget(ClientID, pLine); pSelf->SendChatTarget(ClientID, pLine);