plugins/mod_console.lua

changeset 2007
b89d61db74d1
parent 1977
325a49f8edab
child 2009
3f9cce29c57d
--- a/plugins/mod_console.lua	Sun Oct 18 15:53:08 2009 +0500
+++ b/plugins/mod_console.lua	Sun Oct 18 12:26:53 2009 +0100
@@ -600,6 +600,16 @@
 	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)

mercurial