summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/session.cpp7
-rw-r--r--src/session.hpp2
2 files changed, 5 insertions, 4 deletions
diff --git a/src/session.cpp b/src/session.cpp
index 50f55bb..c71432d 100644
--- a/src/session.cpp
+++ b/src/session.cpp
@@ -249,13 +249,14 @@ bool CSession::write(const std::string &msg) {
return write("{}", msg);
}
-void CSession::writeChat(const CChatManager::SMessage &msg) {
+bool CSession::writeChat(const CChatManager::SMessage &msg) {
if (m_name != msg.username) {
if (msg.admin && !m_isAdmin)
- return;
+ return false;
- write(g_pChatManager->fmtBroadcastMessage(msg));
+ return write(g_pChatManager->fmtBroadcastMessage(msg));
}
+ return false;
}
const std::string &CSession::getName() const {
diff --git a/src/session.hpp b/src/session.hpp
index 65bef68..1669964 100644
--- a/src/session.hpp
+++ b/src/session.hpp
@@ -33,7 +33,7 @@ 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);
+ bool writeChat(const CChatManager::SMessage &msg);
bool isMuted() const;
void setMuted(bool mute);