From 57a4eca963044d4ed8c586f7cbb0d0977bf1c2bd Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Sun, 25 Feb 2024 22:20:02 +0000 Subject: Fix erroneously sending RPL_CHANNELSMSG when a whois chanlist is blocked. --- src/modules/m_servprotect.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/modules/m_servprotect.cpp') 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; } }; -- cgit v1.3.1-10-gc9f91