CClient::PutClient(): handle away-notify and account-notify

This commit is contained in:
J-P Nurmi
2015-09-12 18:18:36 +02:00
parent 0f2a37707f
commit 69f1138052
3 changed files with 38 additions and 24 deletions

View File

@@ -749,8 +749,14 @@ void CClient::PutClient(const CString& sLine) {
Write(sCopy + "\r\n");
}
void CClient::PutClient(const CMessage& Message)
bool CClient::PutClient(const CMessage& Message)
{
if (!m_bAwayNotify && Message.GetType() == CMessage::Type::Away) {
return false;
} else if (!m_bAccountNotify && Message.GetType() == CMessage::Type::Account) {
return false;
}
CString sLine = Message.ToString(CMessage::ExcludeTags);
// TODO: introduce a module hook that gives control over the tags that are sent
@@ -777,6 +783,7 @@ void CClient::PutClient(const CMessage& Message)
}
PutClient(sLine);
return true;
}
void CClient::PutStatusNotice(const CString& sLine) {