aboutsummaryrefslogtreecommitdiffstats
path: root/core/hostmanager.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2015-02-21 10:42:19 +0100
committerKim Alvefur <zash@zash.se>2015-02-21 10:42:19 +0100
commit27265c20e21d071bc96171da9b8707aec6ea669b (patch)
tree71be0c3f872550dc6849e4cde3afd5ebfa68c1b9 /core/hostmanager.lua
parent359ca86e382251845aa294baac60d9f8f58e1fe1 (diff)
downloadprosody-27265c20e21d071bc96171da9b8707aec6ea669b.tar.gz
prosody-27265c20e21d071bc96171da9b8707aec6ea669b.zip
core.*: Remove use of module() function
Diffstat (limited to 'core/hostmanager.lua')
-rw-r--r--core/hostmanager.lua12
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;
+}