diff options
| author | 2023-02-27 19:55:27 +0000 | |
|---|---|---|
| committer | 2023-02-27 20:29:56 +0000 | |
| commit | 62e588896e62fa384280f105881f52e529d8cb95 (patch) | |
| tree | 6556aee57fc285e25daa4a83538428ba17b389e1 /src/modules/m_hideoper.cpp | |
| parent | Allow non-opers with +h to show in `/STATS P`. (diff) | |
Use the stats row count instead of counting opers manually.
Diffstat (limited to 'src/modules/m_hideoper.cpp')
| -rw-r--r-- | src/modules/m_hideoper.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/modules/m_hideoper.cpp b/src/modules/m_hideoper.cpp index 6234f7c93..677d4ea77 100644 --- a/src/modules/m_hideoper.cpp +++ b/src/modules/m_hideoper.cpp @@ -148,14 +148,12 @@ public: if (stats.GetSymbol() != 'P') return MOD_RES_PASSTHRU; - size_t opers = 0; bool source_has_priv = stats.GetSource()->HasPrivPermission("users/auspex"); for (auto* oper : ServerInstance->Users.all_opers) { if (oper->server->IsService() || (oper->IsModeSet(hm) && !source_has_priv)) continue; - opers++; std::string extra; if (oper->IsAway()) { @@ -176,7 +174,7 @@ public: stats.AddGenericRow(INSP_FORMAT("\x02{}\x02 ({}){}", oper->nick, oper->GetRealUserHost(), extra)); } - stats.AddGenericRow(INSP_FORMAT("{} server operator{} total", opers, opers ? "s" : "")); + stats.AddGenericRow(INSP_FORMAT("{} server operator{} total", stats.GetRows().size(), stats.GetRows().size() ? "s" : "")); return MOD_RES_DENY; } }; |
