mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-10-02 19:03:43 +00:00
The NexusDashboard-parity dashboard (dDashboardServer) and everything built on it on the experimental branch: accounts, characters, properties and moderation tools, permissions shared with in-game slash commands, economy reports, World 3D and property 3D views with client scenery, scheduled events (features, vanity changes, live events, announcements, restarts), vanity files and events, the CDClient browser, the message inspector with saved captures, chat filter tools, community challenges, live ops, the AI moderator helper, and the server-side changes they need. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
37 lines
1.4 KiB
C++
37 lines
1.4 KiB
C++
#ifndef __MESSAGEINSPECTOR__H__
|
|
#define __MESSAGEINSPECTOR__H__
|
|
|
|
#include <cstdint>
|
|
|
|
#include "dCommonVars.h"
|
|
#include "MessageType/Game.h"
|
|
|
|
namespace RakNet { class BitStream; }
|
|
struct MessageCaptureControl;
|
|
struct SystemAddress;
|
|
|
|
/**
|
|
* This world's side of the dashboard's game message inspector (see MessageCapture.h): captures the game messages
|
|
* one player sends and receives and sends them to the dashboard through master in small, rate-limited batches.
|
|
*
|
|
* Messages are seen at the two places every game message passes: GameMessageHandler::HandleMessage for what
|
|
* clients send, and dServer::Send for what the server sends (hooked only while a capture runs). With no capture
|
|
* running, the only cost is the IsCapturing() check on received messages.
|
|
*/
|
|
namespace MessageInspector {
|
|
extern bool g_Capturing;
|
|
|
|
inline bool IsCapturing() { return g_Capturing; }
|
|
|
|
// A start or stop from the dashboard. Starts only if the character is in this world.
|
|
void Control(const MessageCaptureControl& control);
|
|
|
|
// A game message a client sent (payload: the bits after the object ID and message ID)
|
|
void RecordReceived(const SystemAddress& sysAddr, LWOOBJID objectId, MessageType::Game messageId, const RakNet::BitStream& payload);
|
|
|
|
// Called from the world server loop: sends what was captured and ends captures that ran out or lost their player
|
|
void Update();
|
|
}
|
|
|
|
#endif //!__MESSAGEINSPECTOR__H__
|