aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2019-07-26 21:06:47 +0200
committerKim Alvefur <zash@zash.se>2019-07-26 21:06:47 +0200
commit54e39ab881929efad96e45c115e7d857b42f456b (patch)
treede897e87324c644ae5e784f37e5a4e003c2e086d
parent65b25e80b00cd99a78a3d8ee9b5a916795e53774 (diff)
downloadprosody-54e39ab881929efad96e45c115e7d857b42f456b.tar.gz
prosody-54e39ab881929efad96e45c115e7d857b42f456b.zip
mod_admin_telnet: Make c2s:count() consistent with c2s:show()
Both now operate on the same complete set of c2s sessions
-rw-r--r--plugins/mod_admin_telnet.lua5
1 files changed, 2 insertions, 3 deletions
diff --git a/plugins/mod_admin_telnet.lua b/plugins/mod_admin_telnet.lua
index 4e34455c..a7ba41b8 100644
--- a/plugins/mod_admin_telnet.lua
+++ b/plugins/mod_admin_telnet.lua
@@ -615,9 +615,8 @@ local function show_c2s(callback)
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)