add chat support for html formatting

This commit is contained in:
DrPerkyLegit 2026-04-06 22:21:44 -04:00
parent b928351e0b
commit 973dcf6e3a
4 changed files with 28 additions and 7 deletions

View file

@ -678,7 +678,7 @@ void PlayerConnection::handleChat(shared_ptr<ChatPacket> packet)
handleCommand(message);
return;
}
wstring formatted = L"<" + player->name + L"> " + message;
wstring formatted = L"&lt;" + player->name + L"&gt; " + message;
server->getPlayers()->broadcastAll(shared_ptr<ChatPacket>(new ChatPacket(formatted)));
chatSpamTickCount += SharedConstants::TICKS_PER_SECOND;
if (chatSpamTickCount > SharedConstants::TICKS_PER_SECOND * 10)