Skip to content

Commit a0527e7

Browse files
committed
palaver: Send notifications regardless of AWAY status
1 parent df39bc0 commit a0527e7

File tree

1 file changed

+24
-26
lines changed

1 file changed

+24
-26
lines changed

palaver.cpp

Lines changed: 24 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1064,39 +1064,37 @@ class CPalaverMod : public CModule {
10641064
#pragma mark -
10651065

10661066
void ParseMessage(CNick& Nick, CString& sMessage, CChan *pChannel = NULL, CString sIntent = "") {
1067-
if (m_pNetwork->IsUserOnline() == false) {
10681067
#if defined VERSION_MAJOR && defined VERSION_MINOR && VERSION_MAJOR >= 1 && VERSION_MINOR >= 2
1069-
CString sCleanMessage = sMessage.StripControls_n();
1068+
CString sCleanMessage = sMessage.StripControls_n();
10701069
#else
1071-
CString &sCleanMessage = sMessage;
1070+
CString &sCleanMessage = sMessage;
10721071
#endif
10731072

1074-
for (std::vector<CDevice*>::const_iterator it = m_vDevices.begin();
1075-
it != m_vDevices.end(); ++it)
1076-
{
1077-
CDevice& device = **it;
1073+
for (std::vector<CDevice*>::const_iterator it = m_vDevices.begin();
1074+
it != m_vDevices.end(); ++it)
1075+
{
1076+
CDevice& device = **it;
10781077

1079-
if (device.IsNetworkConnected(*m_pNetwork)) {
1080-
continue;
1081-
}
1078+
if (device.IsNetworkConnected(*m_pNetwork)) {
1079+
continue;
1080+
}
10821081

1083-
if (device.HasNetwork(*m_pNetwork)) {
1084-
bool bMention = (
1085-
((pChannel == NULL) || device.HasMentionChannel(pChannel->GetName())) ||
1086-
device.HasMentionNick(Nick.GetNick()) ||
1087-
device.IncludesMentionKeyword(sCleanMessage, m_pNetwork->GetIRCNick().GetNick()));
1088-
1089-
if (bMention && (
1090-
(pChannel && device.HasIgnoreChannel(pChannel->GetName())) ||
1091-
device.HasIgnoreNick(Nick.GetNick()) ||
1092-
device.IncludesIgnoreKeyword(sCleanMessage)))
1093-
{
1094-
bMention = false;
1095-
}
1082+
if (device.HasNetwork(*m_pNetwork)) {
1083+
bool bMention = (
1084+
((pChannel == NULL) || device.HasMentionChannel(pChannel->GetName())) ||
1085+
device.HasMentionNick(Nick.GetNick()) ||
1086+
device.IncludesMentionKeyword(sCleanMessage, m_pNetwork->GetIRCNick().GetNick()));
1087+
1088+
if (bMention && (
1089+
(pChannel && device.HasIgnoreChannel(pChannel->GetName())) ||
1090+
device.HasIgnoreNick(Nick.GetNick()) ||
1091+
device.IncludesIgnoreKeyword(sCleanMessage)))
1092+
{
1093+
bMention = false;
1094+
}
10961095

1097-
if (bMention) {
1098-
device.SendNotification(*this, Nick.GetNick(), sCleanMessage, pChannel, sIntent);
1099-
}
1096+
if (bMention) {
1097+
device.SendNotification(*this, Nick.GetNick(), sCleanMessage, pChannel, sIntent);
11001098
}
11011099
}
11021100
}

0 commit comments

Comments
 (0)