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 | 7e6c27dd6bfbc5f0f1069036b28828805bf9d300 (patch) | |
tree | cb8263c5cd38cde4cec026a80b4865f767a139ce | |
parent | e5864b338fb4edc4061c317136e45bfe21808cd8 (diff) | |
download | prosody-7e6c27dd6bfbc5f0f1069036b28828805bf9d300.tar.gz prosody-7e6c27dd6bfbc5f0f1069036b28828805bf9d300.zip |
mod_admin_telnet: Use already generated session id
Don't need to construct it from components again
-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)); |