plugins/mod_console.lua

changeset 1924
75e6ba240888
parent 1914
e7f6baf39b56
child 1927
c3384860e23f
equal deleted inserted replaced
1923:2d242334508d 1924:75e6ba240888
493 print(" Dialback has been requested, but no result received"); 493 print(" Dialback has been requested, but no result received");
494 end 494 end
495 end 495 end
496 end 496 end
497 end 497 end
498 498 local subhost_filter = function (h)
499 return (match_jid and h:match(match_jid));
500 end
499 for session in pairs(incoming_s2s) do 501 for session in pairs(incoming_s2s) do
500 if session.to_host == host and ((not match_jid) or host:match(match_jid) 502 if session.to_host == host and ((not match_jid) or host:match(match_jid)
501 or (session.from_host and session.from_host:match(match_jid))) then 503 or (session.from_host and session.from_host:match(match_jid))
504 -- Pft! is what I say to list comprehensions
505 or (session.hosts and #array.collect(keys(session.hosts)):filter(subhost_filter)>0)) then
502 count_in = count_in + 1; 506 count_in = count_in + 1;
503 print(" "..host.." <- "..(session.from_host or "(unknown)")..(session.secure and "(encrypted)" or "")); 507 print(" "..host.." <- "..(session.from_host or "(unknown)")..(session.secure and "(encrypted)" or ""));
504 if session.type == "s2sin_unauthed" then 508 if session.type == "s2sin_unauthed" then
505 print(" Connection not yet authenticated"); 509 print(" Connection not yet authenticated");
506 end 510 end

mercurial