diff options
author | Waqas Hussain <waqas20@gmail.com> | 2010-02-11 05:36:03 +0500 |
---|---|---|
committer | Waqas Hussain <waqas20@gmail.com> | 2010-02-11 05:36:03 +0500 |
commit | f33b657ef4ff9cd6dedbceefced8d9c7bf76cd0b (patch) | |
tree | 30bef58f715e3a7eba5d83d370b399711ee8c7e4 /core/modulemanager.lua | |
parent | 85d418686afb7e715dbfb9bfb5fc4372afcef151 (diff) | |
download | prosody-f33b657ef4ff9cd6dedbceefced8d9c7bf76cd0b.tar.gz prosody-f33b657ef4ff9cd6dedbceefced8d9c7bf76cd0b.zip |
modulemanager: Load plugin libraries in the same environment as the plugins.
Diffstat (limited to 'core/modulemanager.lua')
-rw-r--r-- | core/modulemanager.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/modulemanager.lua b/core/modulemanager.lua index 37c5e382..6b2260f5 100644 --- a/core/modulemanager.lua +++ b/core/modulemanager.lua @@ -398,7 +398,7 @@ function api:require(lib) f, n = pluginloader.load_code(lib, lib..".lib.lua"); end if not f then error("Failed to load plugin library '"..lib.."', error: "..n); end -- FIXME better error message - setfenv(f, setmetatable({ module = self }, { __index = _G })); + setfenv(f, self.environment); return f(); end |