summaryrefslogtreecommitdiff
path: root/src/modules/m_denychans.cpp
diff options
context:
space:
mode:
authorMatt Schatz <genius3000@g3k.solutions>2019-07-04 10:17:30 -0600
committerPeter Powell <petpow@saberuk.com>2019-07-04 17:17:30 +0100
commit3450b3d1ccc1763d25a95315509ae3253fadcf89 (patch)
treeb864216afc7b757c6938d94e7f5641f793c3bf23 /src/modules/m_denychans.cpp
parent0d33974a75b0764864b316a481cfaf75937d3f57 (diff)
Fix whitelist check for a badchan redirect (#1676).
Diffstat (limited to 'src/modules/m_denychans.cpp')
-rw-r--r--src/modules/m_denychans.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/modules/m_denychans.cpp b/src/modules/m_denychans.cpp
index cc4172529..77adf29bc 100644
--- a/src/modules/m_denychans.cpp
+++ b/src/modules/m_denychans.cpp
@@ -120,9 +120,18 @@ class ModuleDenyChannels : public Module
continue;
// If the redirect channel is whitelisted then it is okay.
+ bool whitelisted = false;
for (GoodChannels::const_iterator j = goodchans.begin(); j != goodchans.end(); ++j)
+ {
if (InspIRCd::Match(badchan.redirect, *j))
- continue;
+ {
+ whitelisted = true;
+ break;
+ }
+ }
+
+ if (whitelisted)
+ continue;
// If the redirect channel is not blacklisted then it is okay.
for (BadChannels::const_iterator j = badchans.begin(); j != badchans.end(); ++j)