aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_admin_telnet.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2013-06-20 21:47:28 +0200
committerKim Alvefur <zash@zash.se>2013-06-20 21:47:28 +0200
commit558cea1bd9a0fdf53a2ec8331fb7ad7b984f47c5 (patch)
treef5f98102e4d25a56db2fe1d10b00d2b21cd2aef5 /plugins/mod_admin_telnet.lua
parentebf71acb9ef9a09d2f85c462dfcc4aabb91aff62 (diff)
downloadprosody-558cea1bd9a0fdf53a2ec8331fb7ad7b984f47c5.tar.gz
prosody-558cea1bd9a0fdf53a2ec8331fb7ad7b984f47c5.zip
mod_admin_telnet: Generate session names the same way as in s2smanager
Diffstat (limited to 'plugins/mod_admin_telnet.lua')
-rw-r--r--plugins/mod_admin_telnet.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/mod_admin_telnet.lua b/plugins/mod_admin_telnet.lua
index b2b97fa5..823c71ce 100644
--- a/plugins/mod_admin_telnet.lua
+++ b/plugins/mod_admin_telnet.lua
@@ -788,7 +788,7 @@ function def_env.s2s:close(from, to)
end
for _, session in pairs(s2s_sessions) do
- local id = session.type..tostring(session):sub(10);
+ local id = 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));