From: Kyle Fuller Date: Fri, 24 Mar 2017 13:40:32 +0000 (+0100) Subject: fix: Don't send notification to connected devices X-Git-Tag: 1.1.0~4 X-Git-Url: http://git.99rst.org/?a=commitdiff_plain;h=f799b3599ce25630f6609cc4080b6bd1eba5b39e;p=znc-palaver.git fix: Don't send notification to connected devices --- diff --git a/CHANGELOG.md b/CHANGELOG.md index c9693f8..0316e86 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,6 +23,7 @@ now produce an error. This detects compilers that do not have a correct regex implementation. - Prevents stripping colour codes from messages incoming IRC messages. +- ZNC will no longer send push notifications to backgrounded Palaver devices. ## 1.0.1 diff --git a/palaver.cpp b/palaver.cpp index 05dd5c8..99ca4d3 100644 --- a/palaver.cpp +++ b/palaver.cpp @@ -1039,6 +1039,10 @@ public: { CDevice& device = **it; + if (m_pClient && device.HasClient(*m_pClient)) { + continue; + } + if (device.HasNetwork(*m_pNetwork)) { bool bMention = ( ((pChannel == NULL) || device.HasMentionChannel(pChannel->GetName())) ||