Software / code / prosody
Diff
plugins/mod_admin_telnet.lua @ 5231:4f9135e6c2f9
Merge 0.9->trunk
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Sun, 09 Dec 2012 12:39:49 +0100 |
| parent | 5227:97f395938028 |
| child | 5270:20e14961f630 |
line wrap: on
line diff
--- a/plugins/mod_admin_telnet.lua Tue Dec 04 20:11:41 2012 +0000 +++ b/plugins/mod_admin_telnet.lua Sun Dec 09 12:39:49 2012 +0100 @@ -960,14 +960,15 @@ 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 = {};