summaryrefslogtreecommitdiff
path: root/src/session.hpp
diff options
context:
space:
mode:
authorlittleblack111 <littleblack11111@gmail.com>2025-03-23 12:56:38 +0800
committerlittleblack111 <littleblack11111@gmail.com>2025-04-03 18:31:41 +0800
commit50de5f9b80f1859b6eaa3b68c10a3f1cfb994737 (patch)
treebd125b0af19af04776e3740f707a0012555d460f /src/session.hpp
parentb02e484013ede3ed8d43ad19c177af2afb0bbfc8 (diff)
feat: deaf
necessary for being deaf during registeration
Diffstat (limited to 'src/session.hpp')
-rw-r--r--src/session.hpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/session.hpp b/src/session.hpp
index 070a8d4..8aee414 100644
--- a/src/session.hpp
+++ b/src/session.hpp
@@ -27,7 +27,7 @@ class CSession {
void setSelf(std::pair<std::jthread, std::shared_ptr<CSession>> *self);
std::unique_ptr<SRecvData> read();
- std::unique_ptr<SRecvData> read(const std::string &msg);
+ std::unique_ptr<SRecvData> read(const std::string &msg, bool bypassDeaf = false);
bool write(const std::string &msg);
template <typename... Args>
bool write(std::format_string<Args...> fmt, Args &&...args);
@@ -37,6 +37,8 @@ class CSession {
bool isMuted() const;
void setMuted(bool mute);
+ bool isDeaf() const;
+ void setDeaf(bool deaf);
void run();
@@ -60,7 +62,8 @@ class CSession {
bool m_isAdmin = false;
bool m_isReading = false;
- bool m_isMuted = false;
+ bool m_bMuted = false;
+ bool m_bDeaf = true; // init as true as we don't want anything during registerSession
void recvLoop();
bool registerSession();