aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_console.lua
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/mod_console.lua')
-rw-r--r--plugins/mod_console.lua10
1 files changed, 10 insertions, 0 deletions
diff --git a/plugins/mod_console.lua b/plugins/mod_console.lua
index 552819c1..760bf596 100644
--- a/plugins/mod_console.lua
+++ b/plugins/mod_console.lua
@@ -600,6 +600,16 @@ function def_env.host:deactivate(hostname, reason)
return true, "Host "..tostring(hostname).." deactivated";
end
+function def_env.host:list()
+ local print = self.session.print;
+ local i = 0;
+ for host in values(array.collect(keys(prosody.hosts)):sort()) do
+ i = i + 1;
+ print(host);
+ end
+ return true, i.." hosts";
+end
+
-------------
function printbanner(session)