mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Fix formatting for server chat messages with time in already
This commit is contained in:
parent
98520bb407
commit
0e1cc205ef
|
@ -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);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue