diff options
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/mod_admin_shell.lua | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/plugins/mod_admin_shell.lua b/plugins/mod_admin_shell.lua index 15a41b55..12fe2031 100644 --- a/plugins/mod_admin_shell.lua +++ b/plugins/mod_admin_shell.lua @@ -1100,7 +1100,19 @@ function def_env.s2s:show(match_jid, colspec) local function match(session) local host, remote = get_s2s_hosts(session); - return not match_jid or match_jid == "*" or host == match_jid or remote == match_jid; + if not match_jid or match_jid == "*" then + return true; + elseif host == match_jid or remote == match_jid then + return true; + elseif match_jid:sub(1, 2) == "*." then + -- (host) == *.(host) or sub(.host) == *(.host) + if host == match_jid:sub(3) or host:sub(-#match_jid + 1) == match_jid:sub(2) then + return true + elseif remote == match_jid:sub(3) or remote:sub(-#match_jid + 1) == match_jid:sub(2) then + return true + end + end + return false; end local group_by_host = true; |