diff options
author | Waqas Hussain <waqas20@gmail.com> | 2010-02-11 05:34:53 +0500 |
---|---|---|
committer | Waqas Hussain <waqas20@gmail.com> | 2010-02-11 05:34:53 +0500 |
commit | 85d418686afb7e715dbfb9bfb5fc4372afcef151 (patch) | |
tree | f77b9bf793692d76d100b3737e0a425e1de0a813 /core | |
parent | 3b288052d51c3aa753ace60140b901af423e74b7 (diff) | |
download | prosody-85d418686afb7e715dbfb9bfb5fc4372afcef151.tar.gz prosody-85d418686afb7e715dbfb9bfb5fc4372afcef151.zip |
modulemanager: Make the plugin environment available directly (module.environment within plugins).
Diffstat (limited to 'core')
-rw-r--r-- | core/modulemanager.lua | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/core/modulemanager.lua b/core/modulemanager.lua index d8418d83..37c5e382 100644 --- a/core/modulemanager.lua +++ b/core/modulemanager.lua @@ -127,6 +127,7 @@ function load(host, module_name, config) local api_instance = setmetatable({ name = module_name, host = host, config = config, _log = _log, log = function (self, ...) return _log(...); end }, { __index = api }); local pluginenv = setmetatable({ module = api_instance }, { __index = _G }); + api_instance.environment = pluginenv; setfenv(mod, pluginenv); if not hosts[host] then |