diff options
author | Matthew Wild <mwild1@gmail.com> | 2009-10-05 18:47:01 +0100 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2009-10-05 18:47:01 +0100 |
commit | 0a4866517055a976b9c1cc177a4be99e1214c357 (patch) | |
tree | 5610d57b149e997d724d1127ad82536af95a3c31 /plugins | |
parent | 08c994f507faf7f9373582cac0869f471fb0d9b5 (diff) | |
download | prosody-0a4866517055a976b9c1cc177a4be99e1214c357.tar.gz prosody-0a4866517055a976b9c1cc177a4be99e1214c357.zip |
mod_console: Also search piggy-backed, er, multiplexed domains when passing a filter to s2s:show()
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/mod_console.lua | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/plugins/mod_console.lua b/plugins/mod_console.lua index 43cb8b13..e2d3435f 100644 --- a/plugins/mod_console.lua +++ b/plugins/mod_console.lua @@ -495,10 +495,14 @@ function def_env.s2s:show(match_jid) end end end - + local subhost_filter = function (h) + return (match_jid and h:match(match_jid)); + end for session in pairs(incoming_s2s) do if session.to_host == host and ((not match_jid) or host:match(match_jid) - or (session.from_host and session.from_host:match(match_jid))) then + or (session.from_host and session.from_host:match(match_jid)) + -- Pft! is what I say to list comprehensions + or (session.hosts and #array.collect(keys(session.hosts)):filter(subhost_filter)>0)) then count_in = count_in + 1; print(" "..host.." <- "..(session.from_host or "(unknown)")..(session.secure and "(encrypted)" or "")); if session.type == "s2sin_unauthed" then |