diff options
| author | littleblack111 <littleblack11111@gmail.com> | 2025-03-10 18:36:00 +0800 |
|---|---|---|
| committer | littleblack111 <littleblack11111@gmail.com> | 2025-03-20 23:44:58 +0800 |
| commit | 131dc244e67e3b6e9304e7076c397c761860044c (patch) | |
| tree | 56f634c1a16c4e5b6eb2224ba876ca97f68e4dee /src/sessionManager.hpp | |
| parent | 4e8644b8ab3b259a91387c93a3295092bd9757a0 (diff) | |
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)
Diffstat (limited to 'src/sessionManager.hpp')
| -rw-r--r-- | src/sessionManager.hpp | 5 |
1 files changed, 4 insertions, 1 deletions
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<std::jthread, std::shared_ptr<CSession>> *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<std::jthread, std::shared_ptr<CSession>> *session); + bool nameExists(const std::string &name); + private: void broadcastChat(const std::string &msg, const std::string &username) const; + std::vector<std::pair<std::jthread, std::shared_ptr<CSession>>> m_vSessions; friend class CChatManager; }; |
