diff options
Diffstat (limited to 'core/hostmanager.lua')
-rw-r--r-- | core/hostmanager.lua | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/core/hostmanager.lua b/core/hostmanager.lua index 046722b1..53c1cd4e 100644 --- a/core/hostmanager.lua +++ b/core/hostmanager.lua @@ -28,7 +28,7 @@ local pairs, select, rawget = pairs, select, rawget; local tostring, type = tostring, type; local setmetatable = setmetatable; -module "hostmanager" +local _ENV = nil; local host_mt = { } function host_mt:__tostring() @@ -45,6 +45,8 @@ end local hosts_loaded_once; +local activate, deactivate; + local function load_enabled_hosts(config) local defined_hosts = config or configmanager.getconfig(); local activated_any_host; @@ -164,8 +166,12 @@ function deactivate(host, reason) return true; end -function get_children(host) +local function get_children(host) return disco_items:get(host) or NULL; end -return _M; +return { + activate = activate; + deactivate = deactivate; + get_children = get_children; +} |