diff options
author | Matthew Wild <mwild1@gmail.com> | 2012-04-28 16:22:17 +0100 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2012-04-28 16:22:17 +0100 |
commit | 148ed8aa768f5f1644c312f1a2057c6ccc2a1f35 (patch) | |
tree | bd94e2251a4cbc4ea5211a953c2b9ba831790715 /plugins/mod_admin_telnet.lua | |
parent | 5b639b3f2c245455e1e6a2194379c85ebd5de814 (diff) | |
parent | ad6b4cd46567245baf4d280e9e3f9dfbdf7fee23 (diff) | |
download | prosody-148ed8aa768f5f1644c312f1a2057c6ccc2a1f35.tar.gz prosody-148ed8aa768f5f1644c312f1a2057c6ccc2a1f35.zip |
Merge with Zash
Diffstat (limited to 'plugins/mod_admin_telnet.lua')
-rw-r--r-- | plugins/mod_admin_telnet.lua | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/plugins/mod_admin_telnet.lua b/plugins/mod_admin_telnet.lua index 202170ba..544ea161 100644 --- a/plugins/mod_admin_telnet.lua +++ b/plugins/mod_admin_telnet.lua @@ -440,6 +440,16 @@ local function show_c2s(callback) end end +function def_env.c2s:count(match_jid) + local count = 0; + show_c2s(function (jid, session) + if (not match_jid) or jid:match(match_jid) then + count = count + 1; + end + end); + return true, "Total: "..count.." clients"; +end + function def_env.c2s:show(match_jid) local print, count = self.session.print, 0; local curr_host; |