Software /
code /
prosody
Diff
core/hostmanager.lua @ 6791:e813e8cf6046
Merge 0.10->trunk
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Thu, 20 Aug 2015 13:05:22 +0200 |
parent | 6721:3807af36d773 |
parent | 6779:6236668da30a |
child | 7143:fa6cd0e9105d |
line wrap: on
line diff
--- a/core/hostmanager.lua Mon Aug 17 01:58:53 2015 +0200 +++ b/core/hostmanager.lua Thu Aug 20 13:05:22 2015 +0200 @@ -28,7 +28,7 @@ local tostring, type = tostring, type; local setmetatable = setmetatable; -module "hostmanager" +local _ENV = nil; local host_mt = { } function host_mt:__tostring() @@ -45,6 +45,8 @@ local hosts_loaded_once; +local activate, deactivate; + local function load_enabled_hosts(config) local defined_hosts = config or configmanager.getconfig(); local activated_any_host; @@ -157,8 +159,12 @@ 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; +}