Software /
code /
prosody
Comparison
core/modulemanager.lua @ 4454:c73793664bfb
modulemanager: Remove 'config' from module environments (no modules use it that I'm aware of)
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Tue, 13 Dec 2011 13:34:21 +0000 |
parent | 4383:718445c040c4 |
child | 4531:c778ce7e3c78 |
comparison
equal
deleted
inserted
replaced
4453:7dc743378e1e | 4454:c73793664bfb |
---|---|
115 log("error", "Unable to load module '%s': %s", module_name or "nil", err or "nil"); | 115 log("error", "Unable to load module '%s': %s", module_name or "nil", err or "nil"); |
116 return nil, err; | 116 return nil, err; |
117 end | 117 end |
118 | 118 |
119 local _log = logger.init(host..":"..module_name); | 119 local _log = logger.init(host..":"..module_name); |
120 local api_instance = setmetatable({ name = module_name, host = host, path = err, config = config, _log = _log, log = function (self, ...) return _log(...); end }, { __index = api }); | 120 local api_instance = setmetatable({ name = module_name, host = host, path = err, _log = _log, log = function (self, ...) return _log(...); end }, { __index = api }); |
121 | 121 |
122 local pluginenv = setmetatable({ module = api_instance }, { __index = _G }); | 122 local pluginenv = setmetatable({ module = api_instance }, { __index = _G }); |
123 api_instance.environment = pluginenv; | 123 api_instance.environment = pluginenv; |
124 | 124 |
125 setfenv(mod, pluginenv); | 125 setfenv(mod, pluginenv); |