Software /
code /
prosody
Diff
plugins/mod_admin_telnet.lua @ 5709:5557b4a4cb49
mod_admin_telnet: Generate session names the same way as in s2smanager
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Thu, 20 Jun 2013 21:47:28 +0200 |
parent | 5708:667cf4e45356 |
child | 5710:e66bbfdf588e |
line wrap: on
line diff
--- a/plugins/mod_admin_telnet.lua Thu Jun 20 20:53:29 2013 +0200 +++ b/plugins/mod_admin_telnet.lua Thu Jun 20 21:47:28 2013 +0200 @@ -788,7 +788,7 @@ 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));