From 131dc244e67e3b6e9304e7076c397c761860044c Mon Sep 17 00:00:00 2001 From: littleblack111 Date: Mon, 10 Mar 2025 18:36:00 +0800 Subject: fix(registerName): no longer allow same name the previous behaviour was it wouldn't broadcast the message to the same name debug: more logging, maybe we should disable TRACE by default in the future? WIP: partial impl of signal handling(SIGINT(keyboardinterrupt) etc) --- src/sessionManager.hpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/sessionManager.hpp') diff --git a/src/sessionManager.hpp b/src/sessionManager.hpp index ea5fce9..08ba541 100644 --- a/src/sessionManager.hpp +++ b/src/sessionManager.hpp @@ -13,14 +13,17 @@ class CSessionManager { std::pair> *newSession(Hyprutils::OS::CFileDescriptor sockfd); - void enterLoop(); + void run(); void broadcast(const std::string &msg, eFormatType type = NONE) const; void kick(const CSession *session) const; void addSession(const CSession &session); void removeSession(std::pair> *session); + bool nameExists(const std::string &name); + private: void broadcastChat(const std::string &msg, const std::string &username) const; + std::vector>> m_vSessions; friend class CChatManager; }; -- cgit v1.2.3