diff options
| author | 2024-09-22 14:17:34 +0100 | |
|---|---|---|
| committer | 2024-09-22 14:17:34 +0100 | |
| commit | 1686b006750a30bb3e4094eec94fe49e31539c15 (patch) | |
| tree | 8f1bfec46d5950d8cdc7d42c2bd7ce7d2ae8b166 /src/modules/m_hidechans.cpp | |
| parent | Allow opting-out of saving bot messages in the channel history. (diff) | |
| download | inspircd++-1686b006750a30bb3e4094eec94fe49e31539c15.tar.gz inspircd++-1686b006750a30bb3e4094eec94fe49e31539c15.tar.bz2 inspircd++-1686b006750a30bb3e4094eec94fe49e31539c15.zip | |
Refactor hidechans slightly.
Diffstat (limited to 'src/modules/m_hidechans.cpp')
| -rw-r--r-- | src/modules/m_hidechans.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/modules/m_hidechans.cpp b/src/modules/m_hidechans.cpp index 36fbbaac8..da3caa552 100644 --- a/src/modules/m_hidechans.cpp +++ b/src/modules/m_hidechans.cpp @@ -44,7 +44,7 @@ class ModuleHideChans final , public Whois::LineEventListener { private: - bool AffectsOpers; + bool affectsopers; HideChans hm; ModResult ShouldHideChans(LocalUser* source, User* target) @@ -55,7 +55,7 @@ private: if (!target->IsModeSet(hm)) return MOD_RES_PASSTHRU; // Mode not set on the target. - if (!AffectsOpers && source->HasPrivPermission("users/auspex")) + if (!affectsopers && source->HasPrivPermission("users/auspex")) return MOD_RES_PASSTHRU; // Opers aren't exempt or the oper doesn't have the right priv. return MOD_RES_DENY; @@ -72,7 +72,8 @@ public: void ReadConfig(ConfigStatus& status) override { - AffectsOpers = ServerInstance->Config->ConfValue("hidechans")->getBool("affectsopers"); + const auto& tag = ServerInstance->Config->ConfValue("hidechans"); + affectsopers = tag->getBool("affectsopers"); } ModResult OnWhoVisible(const Who::Request& request, LocalUser* source, Membership* memb) override |
