F4MP/tiltedcode/Code/server/Services/AdminService.h
Jous99 37b16f1547 code upload
codigo original de f4mp y tilted para referencias
2026-01-06 18:45:00 +01:00

29 lines
713 B
C++

#pragma once
#include <Events/AdminPacketEvent.h>
#include <spdlog/sinks/base_sink.h>
struct World;
struct UpdateEvent;
struct AdminShutdownRequest;
/**
* @brief Handles communication from an admin client.
*
* This service is currently not in use.
*/
class AdminService : public spdlog::sinks::base_sink<spdlog::details::null_mutex>
{
public:
AdminService(World& aWorld, entt::dispatcher& aDispatcher);
private:
void HandleShutdown(const AdminPacketEvent<AdminShutdownRequest>& aChanges) noexcept;
void sink_it_(const spdlog::details::log_msg& msg) override;
void flush_() override;
Vector<String> m_messages;
entt::scoped_connection m_shutdownConnection;
World& m_world;
};