Software /
code /
prosody
Diff
plugins/mod_admin_shell.lua @ 12398:478fff93ac37
mod_admin_shell: Add session.is_connected() method
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Thu, 17 Mar 2022 10:23:12 +0000 |
parent | 12397:ddf02f2a3354 |
child | 12399:d99772b739e0 |
line wrap: on
line diff
--- a/plugins/mod_admin_shell.lua Thu Mar 17 10:22:47 2022 +0000 +++ b/plugins/mod_admin_shell.lua Thu Mar 17 10:23:12 2022 +0000 @@ -104,6 +104,9 @@ end; serialize = tostring; disconnect = function () admin_session:close(); end; + is_connected = function () + return not not admin_session.conn; + end }; session.env = setmetatable({}, default_env_mt);