Diff

plugins/mod_admin_telnet.lua @ 9989:026f9594f661

mod_admin_telnet: include BOSH connections in c2s:count (#998)
author Arc Riley <arcriley@gmail.com>
date Thu, 02 May 2019 17:44:21 -0700
parent 9988:cdf0b63a0d61
child 10044:4fd27023224a
line wrap: on
line diff
--- a/plugins/mod_admin_telnet.lua	Thu May 02 17:28:49 2019 -0700
+++ b/plugins/mod_admin_telnet.lua	Thu May 02 17:44:21 2019 -0700
@@ -612,7 +612,9 @@
 end
 
 function def_env.c2s:count()
-	return true, "Total: "..  iterators.count(values(module:shared"/*/c2s/sessions")) .." clients";
+	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";
 end
 
 function def_env.c2s:show(match_jid, annotate)