diff options
author | Kim Alvefur <zash@zash.se> | 2019-07-28 01:43:10 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2019-07-28 01:43:10 +0200 |
commit | 9e57e0279736a1ec952d4915b02735b14ddb6d19 (patch) | |
tree | cb8263c5cd38cde4cec026a80b4865f767a139ce /plugins/mod_admin_telnet.lua | |
parent | 49b3e1479cef50bc69f72b5e32ff115c7975c062 (diff) | |
download | prosody-9e57e0279736a1ec952d4915b02735b14ddb6d19.tar.gz prosody-9e57e0279736a1ec952d4915b02735b14ddb6d19.zip |
mod_admin_telnet: Use already generated session id
Don't need to construct it from components again
Diffstat (limited to 'plugins/mod_admin_telnet.lua')
-rw-r--r-- | plugins/mod_admin_telnet.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/mod_admin_telnet.lua b/plugins/mod_admin_telnet.lua index df702b91..b6cdfe82 100644 --- a/plugins/mod_admin_telnet.lua +++ b/plugins/mod_admin_telnet.lua @@ -910,7 +910,7 @@ function def_env.s2s:close(from, to, text, condition) end for _, session in pairs(s2s_sessions) do - local id = session.type..tostring(session):match("[a-f0-9]+$"); + local id = session.id or (session.type..tostring(session):match("[a-f0-9]+$")); if (match_id and match_id == id) or (session.from_host == from and session.to_host == to) then print(("Closing connection from %s to %s [%s]"):format(session.from_host, session.to_host, id)); |