hostmanager: Add support for 'disco_hidden' option to hide hosts from disco#items (thanks Ge0rG)
authorMatthew Wild <mwild1@gmail.com>
Wed, 20 Sep 2017 14:42:21 +0100
changeset 8254 cb2d86f4b511
parent 8253 9ea5ea53744b
child 8255 63e505578d4f
hostmanager: Add support for 'disco_hidden' option to hide hosts from disco#items (thanks Ge0rG)
core/hostmanager.lua
--- a/core/hostmanager.lua	Mon Sep 18 18:35:01 2017 +0200
+++ b/core/hostmanager.lua	Wed Sep 20 14:42:21 2017 +0100
@@ -100,7 +100,7 @@
 		host_session.type = "component";
 	end
 	hosts[host] = host_session;
-	if not host:match("[@/]") then
+	if not host_config.disco_hidden and not host:match("[@/]") then
 		disco_items:set(host:match("%.(.*)") or "*", host, host_config.name or true);
 	end
 	for option_name in pairs(host_config) do