summaryrefslogtreecommitdiff
path: root/src/sessionManager.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/sessionManager.hpp')
-rw-r--r--src/sessionManager.hpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/sessionManager.hpp b/src/sessionManager.hpp
index 21c47b9..79fa372 100644
--- a/src/sessionManager.hpp
+++ b/src/sessionManager.hpp
@@ -15,13 +15,16 @@ class CSessionManager {
void run();
void broadcast(const std::string &msg) const;
- void kick(const CSession *session) const;
+ void kick(const CSession *session, const std::string &reason = "") const;
void addSession(const CSession &session);
- void removeSession(std::pair<std::jthread, std::shared_ptr<CSession>> *session);
+ void removeSession(std::pair<std::jthread, std::shared_ptr<CSession>> *session, const bool &kill = false);
bool nameExists(const std::string &name);
void shutdownSessions();
+ const CSession *getByName(const std::string &name) const;
+ const CSession *getByIp(const char m_ip[INET_ADDRSTRLEN]) const;
+
private:
void broadcastChat(const std::string &msg, const std::string &username) const;