Thu, 11 Feb 2010 05:36:03 +0500
modulemanager: Load plugin libraries in the same environment as the plugins.
core/modulemanager.lua | file | annotate | diff | comparison | revisions |
--- a/core/modulemanager.lua Thu Feb 11 05:34:53 2010 +0500 +++ b/core/modulemanager.lua Thu Feb 11 05:36:03 2010 +0500 @@ -398,7 +398,7 @@ 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