Software /
code /
prosody
Changeset
7911:e528d848a185
mod_admin_telnet: Print a message to open sessions when shutting down, including the reason
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Tue, 21 Feb 2017 17:34:01 +0100 |
parents | 7908:dbdaa8487ecd |
children | 7912:2c204ba8e52e |
files | plugins/mod_admin_telnet.lua |
diffstat | 1 files changed, 6 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/mod_admin_telnet.lua Mon Feb 20 01:26:48 2017 +0100 +++ b/plugins/mod_admin_telnet.lua Tue Feb 21 17:34:01 2017 +0100 @@ -1130,6 +1130,12 @@ 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)