diff options
| author | 2023-02-27 22:11:52 +0000 | |
|---|---|---|
| committer | 2023-02-27 22:11:52 +0000 | |
| commit | 45d68e95c90ad0830770950b1ec89410f2fcc811 (patch) | |
| tree | ebdb2c060db03020e58f521b63dcb55ff35df402 /src/modules | |
| parent | Allow differentiating non-oper helpers from opers. (diff) | |
Sort opers alphabetically in `/STATS P`.
Diffstat (limited to 'src/modules')
| -rw-r--r-- | src/modules/m_hideoper.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/modules/m_hideoper.cpp b/src/modules/m_hideoper.cpp index 677d4ea77..e1b4898f7 100644 --- a/src/modules/m_hideoper.cpp +++ b/src/modules/m_hideoper.cpp @@ -174,6 +174,12 @@ public: stats.AddGenericRow(INSP_FORMAT("\x02{}\x02 ({}){}", oper->nick, oper->GetRealUserHost(), extra)); } + + // Sort opers alphabetically. + std::sort(stats.GetRows().begin(), stats.GetRows().end(), [](const auto& lhs, const auto& rhs) { + return lhs.GetParams()[1] < rhs.GetParams()[1]; + }); + stats.AddGenericRow(INSP_FORMAT("{} server operator{} total", stats.GetRows().size(), stats.GetRows().size() ? "s" : "")); return MOD_RES_DENY; } |
