summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2009-09-15 17:30:25 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2009-09-15 17:30:25 +0000
commit9a1d63bd22de06c0ed153ff19bdaf7769184d73d (patch)
treefd5fae2b04e0cf95316c59d00be2d8b4a1ed389c
parentbdc4f4009052df3a6e7a0532ba6b2859b34cf9e2 (diff)
Where there are hidden servers, report the /map server count as the hidden count if the user cant see these servers. and
calculate the user average over this number of servers too. -- Reported by Syloq, thanks! git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11727 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r--src/modules/m_spanningtree/override_map.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/modules/m_spanningtree/override_map.cpp b/src/modules/m_spanningtree/override_map.cpp
index 9a7f007e3..518c0e16a 100644
--- a/src/modules/m_spanningtree/override_map.cpp
+++ b/src/modules/m_spanningtree/override_map.cpp
@@ -154,7 +154,7 @@ bool ModuleSpanningTree::HandleMap(const std::vector<std::string>& parameters, U
}
}
- float avg_users = totusers * 1.0 / totservers;
+ float avg_users = totusers * 1.0 / line;
ServerInstance->Logs->Log("map",DEBUG,"local");
for (int t = 0; t < line; t++)
@@ -166,7 +166,7 @@ bool ModuleSpanningTree::HandleMap(const std::vector<std::string>& parameters, U
}
ServerInstance->DumpText(user, ":%s %d %s :%d server%s and %d user%s, average %.2f users per server",
ServerInstance->Config->ServerName, RPL_MAPUSERS, user->nick.c_str(),
- totservers, (totservers > 1 ? "s" : ""), totusers, (totusers > 1 ? "s" : ""), avg_users);
+ line, (line > 1 ? "s" : ""), totusers, (totusers > 1 ? "s" : ""), avg_users);
ServerInstance->DumpText(user, ":%s %d %s :End of /MAP", ServerInstance->Config->ServerName,
RPL_ENDMAP, user->nick.c_str());