From dc9606b573e75e83fa3dd27ab9fc7ffeac9ced84 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Sun, 9 Dec 2012 11:44:45 +0100 Subject: mod_admin_telnet: Improve wording when listing users --- plugins/mod_admin_telnet.lua | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'plugins/mod_admin_telnet.lua') 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 = {}; -- cgit v1.2.3