# HG changeset patch # User Kim Alvefur # Date 1487694841 -3600 # Node ID e528d848a1857add3c0ee1131529a43055296c66 # Parent dbdaa8487ecd5326fbb0394c0840b27c661b6535 mod_admin_telnet: Print a message to open sessions when shutting down, including the reason diff -r dbdaa8487ecd -r e528d848a185 plugins/mod_admin_telnet.lua --- 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)