aboutsummaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorGravatar Sadie Powell2024-02-25 22:20:02 +0000
committerGravatar Sadie Powell2024-02-25 22:20:02 +0000
commit57a4eca963044d4ed8c586f7cbb0d0977bf1c2bd (patch)
treea5075271928e8fba13b0c47a899a59110cefc9b3 /src/modules
parentFix matching certificate fingerprints to be case insensitive. (diff)
Fix erroneously sending RPL_CHANNELSMSG when a whois chanlist is blocked.
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/m_hidechans.cpp2
-rw-r--r--src/modules/m_servprotect.cpp5
2 files changed, 5 insertions, 2 deletions
diff --git a/src/modules/m_hidechans.cpp b/src/modules/m_hidechans.cpp
index 91048e971..250915fe2 100644
--- a/src/modules/m_hidechans.cpp
+++ b/src/modules/m_hidechans.cpp
@@ -82,7 +82,7 @@ class ModuleHideChans CXX11_FINAL
ModResult OnWhoisLine(Whois::Context& whois, Numeric::Numeric& numeric) CXX11_OVERRIDE
{
- if (numeric.GetNumeric() != RPL_WHOISCHANNELS)
+ if (numeric.GetNumeric() != RPL_WHOISCHANNELS && numeric.GetNumeric() != RPL_CHANNELSMSG)
return MOD_RES_PASSTHRU;
return ShouldHideChans(whois.GetSource(), whois.GetTarget());
diff --git a/src/modules/m_servprotect.cpp b/src/modules/m_servprotect.cpp
index 6b8f5c3e5..7405b69e2 100644
--- a/src/modules/m_servprotect.cpp
+++ b/src/modules/m_servprotect.cpp
@@ -129,7 +129,10 @@ class ModuleServProtectMode CXX11_FINAL
ModResult OnWhoisLine(Whois::Context& whois, Numeric::Numeric& numeric) CXX11_OVERRIDE
{
- return ((numeric.GetNumeric() == RPL_WHOISCHANNELS) && whois.GetTarget()->IsModeSet(bm)) ? MOD_RES_DENY : MOD_RES_PASSTHRU;
+ if (numeric.GetNumeric() != RPL_WHOISCHANNELS && numeric.GetNumeric() != RPL_CHANNELSMSG)
+ return MOD_RES_PASSTHRU;
+
+ return whois.GetTarget()->IsModeSet(bm) ? MOD_RES_DENY : MOD_RES_PASSTHRU;
}
};