diff options
author | Kim Alvefur <zash@zash.se> | 2012-12-09 12:39:49 +0100 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2012-12-09 12:39:49 +0100 |
commit | 35cb12c554d8b5ee7134a0e15556e91a81a093b4 (patch) | |
tree | 03956a8a9247babc607ab26b998b387ff6caf3cd /plugins/mod_admin_telnet.lua | |
parent | 25f5253ac069dccbc28d4495fc493b5667f3607b (diff) | |
parent | 329ee389c5fdea1e5cab9385accf7fd5fe80c7dc (diff) | |
download | prosody-35cb12c554d8b5ee7134a0e15556e91a81a093b4.tar.gz prosody-35cb12c554d8b5ee7134a0e15556e91a81a093b4.zip |
Merge 0.9->trunk
Diffstat (limited to 'plugins/mod_admin_telnet.lua')
-rw-r--r-- | plugins/mod_admin_telnet.lua | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/plugins/mod_admin_telnet.lua b/plugins/mod_admin_telnet.lua index 0af571eb..a56f2992 100644 --- a/plugins/mod_admin_telnet.lua +++ b/plugins/mod_admin_telnet.lua @@ -960,14 +960,15 @@ function def_env.user:list(host, pat) return nil, "No such host"; end local print = self.session.print; - local count = 0; + local total, matches = 0, 0; for user in um.users(host) do if not pat or user:match(pat) then print(user.."@"..host); + matches = matches + 1; end - count = count + 1; + total = total + 1; end - return true, count .. " users total"; + return true, "Showing "..(pat and (matches.." of ") or "all " )..total.." users"; end def_env.xmpp = {}; |