mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-10-02 10:53:44 +00:00
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:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user