Diff

plugins/mod_admin_telnet.lua @ 10095:a3c66d0294e1

mod_admin_telnet: Use already generated session id Don't need to construct it from components again
author Kim Alvefur <zash@zash.se>
date Sun, 28 Jul 2019 01:43:10 +0200
parent 10094:6b1e89868328
child 10239:5c8526790a18
line wrap: on
line diff
--- a/plugins/mod_admin_telnet.lua	Sun Jul 28 01:39:47 2019 +0200
+++ b/plugins/mod_admin_telnet.lua	Sun Jul 28 01:43:10 2019 +0200
@@ -910,7 +910,7 @@
 	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));