aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_admin_telnet.lua
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
commit7c80b5b23e5a307ff4c62d49d0d98fd92e9908df (patch)
treede897e87324c644ae5e784f37e5a4e003c2e086d /plugins/mod_admin_telnet.lua
parent5bd804db729d2f20a9f82bdd954b71a2b2ba4298 (diff)
downloadprosody-7c80b5b23e5a307ff4c62d49d0d98fd92e9908df.tar.gz
prosody-7c80b5b23e5a307ff4c62d49d0d98fd92e9908df.zip
mod_admin_telnet: Make c2s:count() consistent with c2s:show()
Both now operate on the same complete set of c2s sessions
Diffstat (limited to 'plugins/mod_admin_telnet.lua')
-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)