Software /
code /
prosody
Comparison
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 |
comparison
equal
deleted
inserted
replaced
9988:cdf0b63a0d61 | 9989:026f9594f661 |
---|---|
610 callback(get_jid(session), session) | 610 callback(get_jid(session), session) |
611 end); | 611 end); |
612 end | 612 end |
613 | 613 |
614 function def_env.c2s:count() | 614 function def_env.c2s:count() |
615 return true, "Total: ".. iterators.count(values(module:shared"/*/c2s/sessions")) .." clients"; | 615 local c2s_count = iterators.count(values(module:shared"/*/c2s/sessions")) |
616 local bosh_count = iterators.count(values(module:shared"/*/bosh/sessions")) | |
617 return true, "Total: ".. c2s_count + bosh_count .." clients"; | |
616 end | 618 end |
617 | 619 |
618 function def_env.c2s:show(match_jid, annotate) | 620 function def_env.c2s:show(match_jid, annotate) |
619 local print, count = self.session.print, 0; | 621 local print, count = self.session.print, 0; |
620 annotate = annotate or session_flags; | 622 annotate = annotate or session_flags; |