Changeset

1559:831649bb1922

mod_console: Add server:shutdown() command
author Matthew Wild <mwild1@gmail.com>
date Sat, 18 Jul 2009 18:37:06 +0100
parents 1558:e15917530285
children 1560:a8c14a350de5
files plugins/mod_console.lua
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/mod_console.lua	Sat Jul 18 15:34:36 2009 +0100
+++ b/plugins/mod_console.lua	Sat Jul 18 18:37:06 2009 +0100
@@ -186,6 +186,11 @@
 		minutes, (minutes ~= 1 and "s") or "", os.date("%c", prosody.start_time));
 end
 
+function def_env.server:shutdown(reason)
+	prosody.shutdown(reason);
+	return true, "Shutdown initiated";
+end
+
 def_env.module = {};
 
 local function get_hosts_set(hosts, module)