Comparison

plugins/mod_admin_telnet.lua @ 4912:8d0643281fe2

mod_admin_telnet: Code found and updated, which depended on pre-8c5b5ebaacb0 behaviour.
author Kim Alvefur <zash@zash.se>
date Fri, 25 May 2012 07:08:12 +0200
parent 4807:2999f0fd1347
child 4913:02dbed57a355
comparison
equal deleted inserted replaced
4911:4c8575b09ff6 4912:8d0643281fe2
277 elseif type(hosts) == "string" then 277 elseif type(hosts) == "string" then
278 return set.new { hosts }; 278 return set.new { hosts };
279 elseif hosts == nil then 279 elseif hosts == nil then
280 local mm = require "modulemanager"; 280 local mm = require "modulemanager";
281 local hosts_set = set.new(array.collect(keys(prosody.hosts))) 281 local hosts_set = set.new(array.collect(keys(prosody.hosts)))
282 / function (host) return prosody.hosts[host].type == "local" or module and mm.is_loaded(host, module); end; 282 / function (host) return (prosody.hosts[host].type == "local" or module and mm.is_loaded(host, module)) and host or nil; end;
283 if module and mm.get_module("*", module) then 283 if module and mm.get_module("*", module) then
284 hosts_set:add("*"); 284 hosts_set:add("*");
285 end 285 end
286 return hosts_set; 286 return hosts_set;
287 end 287 end