summaryrefslogtreecommitdiff
path: root/src/sessionManager.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/sessionManager.hpp')
-rw-r--r--src/sessionManager.hpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/sessionManager.hpp b/src/sessionManager.hpp
index 8e02a7d..6e946d6 100644
--- a/src/sessionManager.hpp
+++ b/src/sessionManager.hpp
@@ -15,7 +15,7 @@ class CSessionManager {
std::pair<std::jthread, std::shared_ptr<CSession>> *newSession();
void run();
- void broadcast(const std::string &msg) const;
+ void broadcast(const std::string &msg, std::optional<uintptr_t> self = std::nullopt) const; // second param only specified when we want to exclude the sender
void kick(CSession *session, const bool kill = false, const std::string &reason = "");
void kick(std::pair<std::jthread, std::shared_ptr<CSession>> *session, const bool kill = false, const std::string &reason = "");
void addSession(const CSession &session);
@@ -25,10 +25,11 @@ class CSessionManager {
CSession *getByName(const std::string &name) const;
CSession *getByIp(const std::string &ip) const;
+ CSession *getByPtr(const uintptr_t &p) const;
std::vector<std::shared_ptr<CSession>> getSessions() const;
private:
- void broadcastChat(const CChatManager::SMessage &msg) const;
+ void broadcast(const CChatManager::SMessage &msg) const;
std::vector<std::pair<std::jthread, std::shared_ptr<CSession>>> m_vSessions;