diff options
-rw-r--r-- | language/anope.en_US.po | 4 | ||||
-rw-r--r-- | modules/operserv/os_stats.cpp | 23 |
2 files changed, 3 insertions, 24 deletions
diff --git a/language/anope.en_US.po b/language/anope.en_US.po index 7e516f9ef..ac3cdc251 100644 --- a/language/anope.en_US.po +++ b/language/anope.en_US.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Anope\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-02 12:23+0100\n" +"POT-Creation-Date: 2025-05-10 00:42+0100\n" "PO-Revision-Date: 2025-04-25 13:08+0100\n" "Last-Translator: Sadie Powell <sadie@witchery.services>\n" "Language-Team: English\n" @@ -4527,7 +4527,7 @@ msgid "Servers" msgstr "" #, c-format -msgid "Servers found: %d" +msgid "Servers found: %zu" msgstr "" msgid "Service" diff --git a/modules/operserv/os_stats.cpp b/modules/operserv/os_stats.cpp index 015801fc1..24fe787c6 100644 --- a/modules/operserv/os_stats.cpp +++ b/modules/operserv/os_stats.cpp @@ -48,27 +48,6 @@ struct StatsType final Stats *Stats::me = nullptr; -/** - * Count servers connected to server s - * @param s The server to start counting from - * @return Amount of servers connected to server s - **/ -static int stats_count_servers(Server *s) -{ - if (!s) - return 0; - - int count = 1; - - if (!s->GetLinks().empty()) - { - for (auto *link : s->GetLinks()) - count += stats_count_servers(link); - } - - return count; -} - class CommandOSStats final : public Command { @@ -168,7 +147,7 @@ private: source.Reply(_("Uplink server: %s"), Me->GetLinks().front()->GetName().c_str()); source.Reply(_("Uplink capab: %s"), buf.c_str()); - source.Reply(_("Servers found: %d"), stats_count_servers(Me->GetLinks().front())); + source.Reply(_("Servers found: %zu"), Servers::ByName.size() - 1); return; } |