From 3450b3d1ccc1763d25a95315509ae3253fadcf89 Mon Sep 17 00:00:00 2001 From: Matt Schatz Date: Thu, 4 Jul 2019 10:17:30 -0600 Subject: Fix whitelist check for a badchan redirect (#1676). --- src/modules/m_denychans.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'src/modules/m_denychans.cpp') 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) -- cgit v1.2.3