mod_admin_telnet: Make c2s:count() consistent with c2s:show()
Both now operate on the same complete set of c2s sessions
--- a/plugins/mod_admin_telnet.lua Fri Jul 26 21:05:13 2019 +0200
+++ b/plugins/mod_admin_telnet.lua Fri Jul 26 21:06:47 2019 +0200
@@ -615,9 +615,8 @@
end
function def_env.c2s:count()
- local c2s_count = iterators.count(values(module:shared"/*/c2s/sessions"))
- local bosh_count = iterators.count(values(module:shared"/*/bosh/sessions"))
- return true, "Total: ".. c2s_count + bosh_count .." clients";
+ local c2s = get_c2s();
+ return true, "Total: ".. #c2s .." clients";
end
function def_env.c2s:show(match_jid, annotate)