diff options
author | Kim Alvefur <zash@zash.se> | 2017-02-21 17:34:01 +0100 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2017-02-21 17:34:01 +0100 |
commit | d76ff8e08e19c49cc6a3f76e3800d712356df9c0 (patch) | |
tree | 5a26d4a4b139633b3944fd1e8874b91e0d801546 /plugins/mod_admin_telnet.lua | |
parent | ef1b01c822a6835cd3567885ceba78c7f42d83f7 (diff) | |
download | prosody-d76ff8e08e19c49cc6a3f76e3800d712356df9c0.tar.gz prosody-d76ff8e08e19c49cc6a3f76e3800d712356df9c0.zip |
mod_admin_telnet: Print a message to open sessions when shutting down, including the reason
Diffstat (limited to 'plugins/mod_admin_telnet.lua')
-rw-r--r-- | plugins/mod_admin_telnet.lua | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/plugins/mod_admin_telnet.lua b/plugins/mod_admin_telnet.lua index c73870f3..b24adcf9 100644 --- a/plugins/mod_admin_telnet.lua +++ b/plugins/mod_admin_telnet.lua @@ -1130,6 +1130,12 @@ function def_env.http:list() return true; end +module:hook("server-stopping", function(event) + for conn, session in pairs(sessions) do + session.print("Shutting down: "..(event.reason or "unknown reason")); + end +end); + ------------- function printbanner(session) |