From 3e19bf603af0ac01f6690afe7cf59702a4a5cc02 Mon Sep 17 00:00:00 2001 From: littleblack111 Date: Fri, 21 Mar 2025 18:09:05 +0800 Subject: feat(commands): client execute commands (#8) refactor(session): writeChat, unify written chat internal: removed `CChatManager::broadcastMessage`, just use `g_pSessionManager->broadcastChat(msg)` --- src/sessionManager.hpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/sessionManager.hpp') diff --git a/src/sessionManager.hpp b/src/sessionManager.hpp index a0f4389..4ca3311 100644 --- a/src/sessionManager.hpp +++ b/src/sessionManager.hpp @@ -1,5 +1,6 @@ #pragma once +#include "chatManager.hpp" #include "format.hpp" #include "session.hpp" #include @@ -27,9 +28,10 @@ class CSessionManager { std::vector> getSessions() const; private: - void broadcastChat(const std::string &msg, const std::string &username) const; + void broadcastChat(const CChatManager::SMessage &msg) const; std::vector>> m_vSessions; + friend class CChatManager; }; inline std::shared_ptr g_pSessionManager; -- cgit v1.2.3