From 46be9aec2ecdf1eac5392de2db54addb61ec5495 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Thu, 21 Jul 2022 18:27:53 +0100 Subject: Replace with an operator privilege. --- src/modules/m_showwhois.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/modules') diff --git a/src/modules/m_showwhois.cpp b/src/modules/m_showwhois.cpp index 5de3a3152..8dd1e6cc0 100644 --- a/src/modules/m_showwhois.cpp +++ b/src/modules/m_showwhois.cpp @@ -98,17 +98,16 @@ public: auto tag = ServerInstance->Config->ConfValue("showwhois"); sw.SetOperOnly(tag->getBool("opersonly", true)); - ShowWhoisFromOpers = tag->getBool("showfromopers", true); } void OnWhois(Whois::Context& whois) override { - User* const source = whois.GetSource(); User* const dest = whois.GetTarget(); if (!dest->IsModeSet(sw) || whois.IsSelfWhois()) return; - if (!ShowWhoisFromOpers && source->IsOper()) + User* const source = whois.GetSource(); + if (source->HasPrivPermission("users/secret-whois")) return; if (IS_LOCAL(dest)) -- cgit v1.3.1-10-gc9f91