aboutsummaryrefslogtreecommitdiffstats
path: root/core/moduleapi.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
commit075278ff98d8d5d8026b07b277cef08a474a6eec (patch)
tree71be0c3f872550dc6849e4cde3afd5ebfa68c1b9 /core/moduleapi.lua
parent280f602e1a22ae54b8f06fad2ffd3ff630745317 (diff)
downloadprosody-075278ff98d8d5d8026b07b277cef08a474a6eec.tar.gz
prosody-075278ff98d8d5d8026b07b277cef08a474a6eec.zip
core.*: Remove use of module() function
Diffstat (limited to 'core/moduleapi.lua')
-rw-r--r--core/moduleapi.lua8
1 files changed, 2 insertions, 6 deletions
diff --git a/core/moduleapi.lua b/core/moduleapi.lua
index 0cb1f1e7..5817894f 100644
--- a/core/moduleapi.lua
+++ b/core/moduleapi.lua
@@ -7,7 +7,6 @@
--
local config = require "core.configmanager";
-local modulemanager; -- This gets set from modulemanager
local array = require "util.array";
local set = require "util.set";
local it = require "util.iterators";
@@ -145,6 +144,7 @@ function api:require(lib)
end
function api:depends(name)
+ local modulemanager = require"core.modulemanager";
if not self.dependencies then
self.dependencies = {};
self:hook("module-reloaded", function (event)
@@ -326,6 +326,7 @@ function api:remove_item(key, value)
end
function api:get_host_items(key)
+ local modulemanager = require"core.modulemanager";
local result = modulemanager.get_items(key, self.host) or {};
return result;
end
@@ -417,9 +418,4 @@ function api:measure_global_event(event_name, stat_name)
return self:measure_object_event(prosody.events.wrappers, event_name, stat_name);
end
-function api.init(mm)
- modulemanager = mm;
- return api;
-end
-
return api;