Software /
code /
prosody
Comparison
plugins/mod_admin_shell.lua @ 13872:76582d10bc09 default tip
Merge 13.0->trunk
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Mon, 05 May 2025 17:30:06 +0200 |
parent | 13869:f44f2a8a8c37 |
comparison
equal
deleted
inserted
replaced
13866:7f6916088278 | 13872:76582d10bc09 |
---|---|
1585 return false, "Both from and to are the same... you can't do that :)"; | 1585 return false, "Both from and to are the same... you can't do that :)"; |
1586 end | 1586 end |
1587 | 1587 |
1588 for _, session in pairs(s2s_sessions) do | 1588 for _, session in pairs(s2s_sessions) do |
1589 local id = session.id or (session.type .. tostring(session):match("[a-f0-9]+$")); | 1589 local id = session.id or (session.type .. tostring(session):match("[a-f0-9]+$")); |
1590 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 | 1590 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 |
1591 print(("Closing connection from %s to %s [%s]"):format(session.from_host, session.to_host, id)); | 1591 print(("Closing connection from %s to %s [%s]"):format(session.from_host, session.to_host, id)); |
1592 (session.close or s2smanager.destroy_session)(session, build_reason(text, condition)); | 1592 (session.close or s2smanager.destroy_session)(session, build_reason(text, condition)); |
1593 count = count + 1; | 1593 count = count + 1; |
1594 end | 1594 end |
1595 end | 1595 end |