diff options
Diffstat (limited to 'src/session.hpp')
| -rw-r--r-- | src/session.hpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/session.hpp b/src/session.hpp index 18c587d..1b7b8db 100644 --- a/src/session.hpp +++ b/src/session.hpp @@ -1,6 +1,7 @@ #pragma once #include "FileDescriptor.hpp" +#include "chatManager.hpp" #include "format.hpp" #include <memory> #include <netinet/in.h> @@ -32,12 +33,15 @@ class CSession { bool write(std::format_string<Args...> fmt, Args &&...args); template <typename... Args> bool write(eFormatType type, std::format_string<Args...> fmt, Args &&...args); + void writeChat(const CChatManager::SMessage &msg); void run(); bool isValid(); private: + constexpr static char m_adminIps[1][INET_ADDRSTRLEN] = {"127.0.0.1"}; + enum eEventType : std::uint8_t { READ, WRITE @@ -50,6 +54,7 @@ class CSession { std::string m_name; char m_ip[INET_ADDRSTRLEN]; int m_port; + bool m_isAdmin = false; bool m_isReading = false; |
