Software /
code /
prosody
Comparison
core/modulemanager.lua @ 4535:d46e9ad4fe8a
modulemanager: Cleanup some unused variables, imports, whitespace and add a comment.
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Sun, 22 Jan 2012 18:49:49 +0000 |
parent | 4534:7a0a31c4f6c5 |
child | 4537:d8d257c13562 |
comparison
equal
deleted
inserted
replaced
4534:7a0a31c4f6c5 | 4535:d46e9ad4fe8a |
---|---|
7 -- | 7 -- |
8 | 8 |
9 local logger = require "util.logger"; | 9 local logger = require "util.logger"; |
10 local log = logger.init("modulemanager"); | 10 local log = logger.init("modulemanager"); |
11 local config = require "core.configmanager"; | 11 local config = require "core.configmanager"; |
12 local multitable_new = require "util.multitable".new; | |
13 local st = require "util.stanza"; | |
14 local pluginloader = require "util.pluginloader"; | 12 local pluginloader = require "util.pluginloader"; |
15 | 13 |
16 local hosts = hosts; | 14 local hosts = hosts; |
17 local prosody = prosody; | 15 local prosody = prosody; |
18 | 16 |
44 | 42 |
45 module "modulemanager" | 43 module "modulemanager" |
46 | 44 |
47 local api = _G.require "core.moduleapi"; -- Module API container | 45 local api = _G.require "core.moduleapi"; -- Module API container |
48 | 46 |
47 -- [host] = { [module] = module_env } | |
49 local modulemap = { ["*"] = {} }; | 48 local modulemap = { ["*"] = {} }; |
50 | 49 |
51 local NULL = {}; | 50 local NULL = {}; |
52 | 51 |
53 -- Load modules when a host is activated | 52 -- Load modules when a host is activated |
183 log("error", "Unable to load module '%s': %s", name or "nil", err or "nil"); | 182 log("error", "Unable to load module '%s': %s", name or "nil", err or "nil"); |
184 return nil, err; | 183 return nil, err; |
185 end | 184 end |
186 | 185 |
187 local saved; | 186 local saved; |
188 | |
189 if module_has_method(mod, "save") then | 187 if module_has_method(mod, "save") then |
190 local ok, ret, err = call_module_method(mod, "save"); | 188 local ok, ret, err = call_module_method(mod, "save"); |
191 if ok then | 189 if ok then |
192 saved = ret; | 190 saved = ret; |
193 else | 191 else |