Software /
code /
prosody
Diff
plugins/mod_console.lua @ 1559:831649bb1922
mod_console: Add server:shutdown() command
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Sat, 18 Jul 2009 18:37:06 +0100 |
parent | 1558:e15917530285 |
child | 1582:80d3d95aa83c |
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)