# HG changeset patch # User Kim Alvefur # Date 1745862079 -7200 # Node ID f44f2a8a8c3768877f3fe600b20ed1f1f578eabe # Parent 14b52f217f7a4ebfceb92407aee98d14d91ea409 mod_admin_shell: Fix matching logic in s2s:close (Thanks Menel) It was matching 'from' on the wrong field and the boolean logic was wrong. diff -r 14b52f217f7a -r f44f2a8a8c37 plugins/mod_admin_shell.lua --- a/plugins/mod_admin_shell.lua Fri Apr 25 17:05:13 2025 +0200 +++ b/plugins/mod_admin_shell.lua Mon Apr 28 19:41:19 2025 +0200 @@ -1587,7 +1587,7 @@ for _, session in pairs(s2s_sessions) do local id = session.id or (session.type .. tostring(session):match("[a-f0-9]+$")); - if (match_id and match_id == id) or ((from and match_wildcard(from, session.to_host)) or (to and match_wildcard(to, session.to_host))) then + if (match_id and match_id == id) or ((from and match_wildcard(from, session.from_host)) and (to and match_wildcard(to, session.to_host))) then print(("Closing connection from %s to %s [%s]"):format(session.from_host, session.to_host, id)); (session.close or s2smanager.destroy_session)(session, build_reason(text, condition)); count = count + 1;