diff options
author | Kim Alvefur <zash@zash.se> | 2012-12-09 11:44:45 +0100 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2012-12-09 11:44:45 +0100 |
commit | dc9606b573e75e83fa3dd27ab9fc7ffeac9ced84 (patch) | |
tree | db8dd5386da22ebbe916eb9f4f77a2529fd186cc /plugins/mod_admin_telnet.lua | |
parent | 1e14564983afc5941868d319e71daaa0897ab06e (diff) | |
download | prosody-dc9606b573e75e83fa3dd27ab9fc7ffeac9ced84.tar.gz prosody-dc9606b573e75e83fa3dd27ab9fc7ffeac9ced84.zip |
mod_admin_telnet: Improve wording when listing users
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 = {}; |