diff options
author | Matt Schatz <genius3000@g3k.solutions> | 2019-07-04 10:17:30 -0600 |
---|---|---|
committer | Peter Powell <petpow@saberuk.com> | 2019-07-04 17:17:30 +0100 |
commit | 3450b3d1ccc1763d25a95315509ae3253fadcf89 (patch) | |
tree | b864216afc7b757c6938d94e7f5641f793c3bf23 | |
parent | 0d33974a75b0764864b316a481cfaf75937d3f57 (diff) |
Fix whitelist check for a badchan redirect (#1676).
-rw-r--r-- | src/modules/m_denychans.cpp | 11 |
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) |