Fix STATUSMSG buffering

This commit is contained in:
J-P Nurmi
2015-09-21 15:28:09 +02:00
parent 565d04a8ef
commit 3cb2834cc5
4 changed files with 32 additions and 6 deletions
+3 -3
View File
@@ -818,9 +818,9 @@ void CClient::AddBuffer(const T& Message)
Format.SetTarget(_NAMEDFMT(sTarget));
Format.SetText("{text}");
if (m_pNetwork->IsChan(sTarget)) {
CChan* pChan = m_pNetwork->FindChan(sTarget);
if (pChan && (!pChan->AutoClearChanBuffer() || !m_pNetwork->IsUserOnline())) {
CChan* pChan = m_pNetwork->FindChan(sTarget);
if (pChan) {
if (!pChan->AutoClearChanBuffer() || !m_pNetwork->IsUserOnline()) {
pChan->AddBuffer(Format, Message.GetText());
}
} else if (Message.GetType() != CMessage::Type::Notice) {
+3 -3
View File
@@ -317,7 +317,7 @@ bool CIRCSock::OnActionMessage(CActionMessage& Message) {
CActionMessage Format;
Format.Clone(Message);
Format.SetNick(_NAMEDFMT(Message.GetNick().GetNickMask()));
Format.SetTarget(_NAMEDFMT(pChan->GetName()));
Format.SetTarget(_NAMEDFMT(Message.GetTarget()));
Format.SetText("{text}");
pChan->AddBuffer(Format, Message.GetText());
}
@@ -630,7 +630,7 @@ bool CIRCSock::OnNoticeMessage(CNoticeMessage& Message) {
CNoticeMessage Format;
Format.Clone(Message);
Format.SetNick(_NAMEDFMT(Message.GetNick().GetNickMask()));
Format.SetTarget(_NAMEDFMT(pChan->GetName()));
Format.SetTarget(_NAMEDFMT(Message.GetTarget()));
Format.SetText("{text}");
pChan->AddBuffer(Format, Message.GetText());
}
@@ -1056,7 +1056,7 @@ bool CIRCSock::OnTextMessage(CTextMessage& Message) {
CTextMessage Format;
Format.Clone(Message);
Format.SetNick(_NAMEDFMT(Message.GetNick().GetNickMask()));
Format.SetTarget(_NAMEDFMT(pChan->GetName()));
Format.SetTarget(_NAMEDFMT(Message.GetTarget()));
Format.SetText("{text}");
pChan->AddBuffer(Format, Message.GetText());
}