aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_admin_telnet.lua
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/mod_admin_telnet.lua')
-rw-r--r--plugins/mod_admin_telnet.lua12
1 files changed, 12 insertions, 0 deletions
diff --git a/plugins/mod_admin_telnet.lua b/plugins/mod_admin_telnet.lua
index 62fb10a0..3fb56c58 100644
--- a/plugins/mod_admin_telnet.lua
+++ b/plugins/mod_admin_telnet.lua
@@ -228,6 +228,7 @@ function commands.help(session, data)
print [[user:create(jid, password) - Create the specified user account]]
print [[user:password(jid, password) - Set the password for the specified user account]]
print [[user:delete(jid) - Permanently remove the specified user account]]
+ print [[host:list(hostname) - List users on the specified host]]
elseif section == "server" then
print [[server:version() - Show the server's version number]]
print [[server:uptime() - Show how long the server has been running]]
@@ -952,6 +953,17 @@ function def_env.user:password(jid, password)
end
end
+function def_env.user:list(host)
+ if not host then
+ return nil, "No host given";
+ end
+ local print = self.session.print;
+ for user in um.users(host) do
+ print(user.."@"..host);
+ end
+ return true;
+end
+
def_env.xmpp = {};
local st = require "util.stanza";