# HG changeset patch # User Matthew Wild # Date 1247938626 -3600 # Node ID 831649bb19221e96db2ac9e7ca118fad36b3376d # Parent e159175302859b16238c9c8bf602b5f860455855 mod_console: Add server:shutdown() command diff -r e15917530285 -r 831649bb1922 plugins/mod_console.lua --- 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)