diff options
| author | 2022-07-21 18:27:53 +0100 | |
|---|---|---|
| committer | 2022-07-21 18:27:53 +0100 | |
| commit | 46be9aec2ecdf1eac5392de2db54addb61ec5495 (patch) | |
| tree | bf71b0ab1064449c53ea06aeb2cfd5f48385cbc9 /src/modules/m_showwhois.cpp | |
| parent | Merge branch 'insp3' into master. (diff) | |
Replace <showwhois:showfromopers> with an operator privilege.
Diffstat (limited to 'src/modules/m_showwhois.cpp')
| -rw-r--r-- | src/modules/m_showwhois.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
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)) |
