summaryrefslogtreecommitdiff
path: root/src/session.cpp
diff options
context:
space:
mode:
authorlittleblack111 <littleblack11111@gmail.com>2025-04-07 16:42:48 +0800
committerlittleblack111 <littleblack11111@gmail.com>2025-04-07 16:42:48 +0800
commitcfb29cfd831b8c44112dd15c821ce235e78beb2e (patch)
treeb51a6a3e128952c9c1dffa1e4a0729c9defe090c /src/session.cpp
parentdb9ac114621d4ae436e2f5b9d5f6ad556c1fcd80 (diff)
internal(session::writeChat): also be bool, returns write()'s bool
Diffstat (limited to 'src/session.cpp')
-rw-r--r--src/session.cpp7
1 files changed, 4 insertions, 3 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 {