From 50de5f9b80f1859b6eaa3b68c10a3f1cfb994737 Mon Sep 17 00:00:00 2001 From: littleblack111 Date: Sun, 23 Mar 2025 12:56:38 +0800 Subject: feat: deaf necessary for being deaf during registeration --- src/session.hpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/session.hpp') 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> *self); std::unique_ptr read(); - std::unique_ptr read(const std::string &msg); + std::unique_ptr read(const std::string &msg, bool bypassDeaf = false); bool write(const std::string &msg); template bool write(std::format_string 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(); -- cgit v1.2.3