Comparison

plugins/mod_admin_telnet.lua @ 5005:ab950c9ff074

mod_admin_telnet: Remove unused or duplicated locals
author Kim Alvefur <zash@zash.se>
date Tue, 24 Jul 2012 21:36:47 +0200
parent 4989:573123ff2ab0
child 5006:af7e563cf453
comparison
equal deleted inserted replaced
5001:78a3d275715a 5005:ab950c9ff074
640 ); 640 );
641 end 641 end
642 end 642 end
643 643
644 function def_env.s2s:showcert(domain) 644 function def_env.s2s:showcert(domain)
645 local ser = require "util.serialization".serialize;
646 local print = self.session.print; 645 local print = self.session.print;
647 local domain_sessions = set.new(array.collect(keys(incoming_s2s))) 646 local domain_sessions = set.new(array.collect(keys(incoming_s2s)))
648 /function(session) return session.from_host == domain and session or nil; end; 647 /function(session) return session.from_host == domain and session or nil; end;
649 for local_host in values(prosody.hosts) do 648 for local_host in values(prosody.hosts) do
650 local s2sout = local_host.s2sout; 649 local s2sout = local_host.s2sout;
687 end 686 end
688 end 687 end
689 end 688 end
690 local domain_certs = array.collect(values(cert_set)); 689 local domain_certs = array.collect(values(cert_set));
691 -- Phew. We now have a array of unique certificates presented by domain. 690 -- Phew. We now have a array of unique certificates presented by domain.
692 local print = self.session.print;
693 local n_certs = #domain_certs; 691 local n_certs = #domain_certs;
694 692
695 if n_certs == 0 then 693 if n_certs == 0 then
696 return "No certificates found for "..domain; 694 return "No certificates found for "..domain;
697 end 695 end