comparison core/hostmanager.lua @ 8251:cb2d86f4b511

hostmanager: Add support for 'disco_hidden' option to hide hosts from disco#items (thanks Ge0rG)
author Matthew Wild <mwild1@gmail.com>
date Wed, 20 Sep 2017 14:42:21 +0100
parents 6236668da30a
children 3a6f5b0f56f0 d5d746e4c453
comparison
equal deleted inserted replaced
8250:9ea5ea53744b 8251:cb2d86f4b511
98 host_session.sessions = {}; 98 host_session.sessions = {};
99 else -- component 99 else -- component
100 host_session.type = "component"; 100 host_session.type = "component";
101 end 101 end
102 hosts[host] = host_session; 102 hosts[host] = host_session;
103 if not host:match("[@/]") then 103 if not host_config.disco_hidden and not host:match("[@/]") then
104 disco_items:set(host:match("%.(.*)") or "*", host, host_config.name or true); 104 disco_items:set(host:match("%.(.*)") or "*", host, host_config.name or true);
105 end 105 end
106 for option_name in pairs(host_config) do 106 for option_name in pairs(host_config) do
107 if option_name:match("_ports$") or option_name:match("_interface$") then 107 if option_name:match("_ports$") or option_name:match("_interface$") then
108 log("warn", "%s: Option '%s' has no effect for virtual hosts - put it in the server-wide section instead", host, option_name); 108 log("warn", "%s: Option '%s' has no effect for virtual hosts - put it in the server-wide section instead", host, option_name);