aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2012-12-09 11:44:45 +0100
committerKim Alvefur <zash@zash.se>2012-12-09 11:44:45 +0100
commit440837480dbdbfb36123659cf5e2b4e2a0e63a2f (patch)
treedb8dd5386da22ebbe916eb9f4f77a2529fd186cc
parent193b00e1ff970c1c5566aae8f74dea0c9fd3ed2f (diff)
downloadprosody-440837480dbdbfb36123659cf5e2b4e2a0e63a2f.tar.gz
prosody-440837480dbdbfb36123659cf5e2b4e2a0e63a2f.zip
mod_admin_telnet: Improve wording when listing users
-rw-r--r--plugins/mod_admin_telnet.lua7
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 = {};