diff options
author | Matthew Wild <mwild1@gmail.com> | 2025-01-07 18:16:23 +0000 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2025-01-07 18:16:23 +0000 |
commit | 72b6c110f0c695f5fcaaab2edfa6ad9db37b1f09 (patch) | |
tree | bf3ac8c390b1f21bd121681c2d2c4042e302f2d6 | |
parent | 957c69461fc3d13ef945cb0ccd62b601f18f2e9a (diff) | |
download | prosody-72b6c110f0c695f5fcaaab2edfa6ad9db37b1f09.tar.gz prosody-72b6c110f0c695f5fcaaab2edfa6ad9db37b1f09.zip |
mod_admin_socket: Fire event on admin client disconnect
-rw-r--r-- | plugins/mod_admin_socket.lua | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/plugins/mod_admin_socket.lua b/plugins/mod_admin_socket.lua index ad6aa5d7..b7b6d5f5 100644 --- a/plugins/mod_admin_socket.lua +++ b/plugins/mod_admin_socket.lua @@ -54,7 +54,12 @@ end); local conn, sock; -local listeners = adminstream.server(sessions, fire_admin_event).listeners; +local admin_server = adminstream.server(sessions, fire_admin_event); +local listeners = admin_server.listeners; + +module:hook_object_event(admin_server.events, "disconnected", function (event) + return module:fire_event("admin-disconnected", event); +end); local function accept_connection() module:log("debug", "accepting..."); |