feat(chat): log each message's guild, team and filter result as it is sent

The chat server records the guild of guild chat, the team of team chat and what
the chat filter thinks of whispers, team and guild chat (delivered either way).
World servers mark filtered zone chat. Team IDs start from the chat server's
start time so a restart doesn't hand out the same team ID again.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Aaron Kimbrell
2026-09-29 18:22:32 -05:00
parent af54ca282f
commit ffeb742c82
3 changed files with 27 additions and 8 deletions

View File

@@ -1,5 +1,7 @@
#include "TeamContainer.h"
#include <ctime>
#include "ChatPackets.h"
#include "MessageType/Chat.h"
@@ -10,7 +12,9 @@
namespace {
TeamContainer::Data g_TeamContainer{};
LWOOBJID g_TeamIDCounter = 0;
// Starts from the time the chat server started (in millionths of a second), so a team's ID is not given out again
// after a restart: the chat log tells teams apart by it
LWOOBJID g_TeamIDCounter = static_cast<LWOOBJID>(std::time(nullptr)) * 1000000;
}
ChatHandoff TeamContainer::MakeHandoff() {