CIRCSock::OnWallopsMessage() handler

This commit is contained in:
J-P Nurmi
2015-09-05 02:56:03 +02:00
parent 1346718308
commit b8dbdb0a4b
2 changed files with 13 additions and 5 deletions

View File

@@ -592,11 +592,8 @@ void CIRCSock::ReadLine(const CString& sData) {
return;
}
} else if (Message.GetType() == CMessage::Type::Wallops) {
// :blub!dummy@rox-8DBEFE92 WALLOPS :this is a test
CString sMsg = Message.GetParam(0);
if (!m_pNetwork->IsUserOnline()) {
m_pNetwork->AddNoticeBuffer(":" + _NAMEDFMT(Nick.GetNickMask()) + " WALLOPS :{text}", sMsg);
if (OnWallopsMessage(Message)) {
return;
}
} else if (Message.GetType() == CMessage::Type::Capability) {
if (OnCapabilityMessage(Message)) {
@@ -1097,6 +1094,16 @@ bool CIRCSock::OnTopicMessage(CTopicMessage& Message) {
return (pChan && pChan->IsDetached());
}
bool CIRCSock::OnWallopsMessage(CMessage& Message) {
// :blub!dummy@rox-8DBEFE92 WALLOPS :this is a test
CString sMsg = Message.GetParam(0);
if (!m_pNetwork->IsUserOnline()) {
m_pNetwork->AddNoticeBuffer(":" + _NAMEDFMT(Message.GetNick().GetNickMask()) + " WALLOPS :{text}", sMsg);
}
return false;
}
void CIRCSock::PutIRC(const CString& sLine) {
// Only print if the line won't get sent immediately (same condition as in TrySend()!)
if (m_bFloodProtection && m_iSendsAllowed <= 0) {