Changeset

3452:2d1a5d8893c2

mod_console: Add host:* commands to help (thanks Zash)
author Matthew Wild <mwild1@gmail.com>
date Sat, 14 Aug 2010 15:15:35 +0100
parents 3451:6402a9defcdc
children 3453:fba130c16818
files plugins/mod_console.lua
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/mod_console.lua	Tue Aug 10 14:07:03 2010 +0100
+++ b/plugins/mod_console.lua	Sat Aug 14 15:15:35 2010 +0100
@@ -177,6 +177,7 @@
 	session.print("Sorry, not sure what you want");
 end
 
+
 function commands.help(session, data)
 	local print = session.print;
 	local section = data:match("^help (%w+)");
@@ -187,6 +188,7 @@
 		print [[c2s - Commands to manage local client-to-server sessions]]
 		print [[s2s - Commands to manage sessions between this server and others]]
 		print [[module - Commands to load/reload/unload modules/plugins]]
+		print [[host - Commands to activate, deactivate and list virtual hosts]]
 		print [[server - Uptime, version, shutting down, etc.]]
 		print [[config - Reloading the configuration, etc.]]
 		print [[console - Help regarding the console itself]]
@@ -203,6 +205,10 @@
 		print [[module:reload(module, host) - The same, but unloads and loads the module (saving state if the module supports it)]]
 		print [[module:unload(module, host) - The same, but just unloads the module from memory]]
 		print [[module:list(host) - List the modules loaded on the specified host]]
+	elseif section == "host" then
+		print [[host:activate(hostname) - Activates the specified host]]
+		print [[host:deactivate(hostname) - Disconnects all clients on this host and deactivates]]
+		print [[host:list() - List the currently-activated hosts]]
 	elseif section == "server" then
 		print [[server:version() - Show the server's version number]]
 		print [[server:uptime() - Show how long the server has been running]]