Tue, 23 Jun 2009 02:15:04 +0500
modulemanager: Enabled access to the module API from plugin libraries
core/modulemanager.lua | file | annotate | diff | comparison | revisions |
--- a/core/modulemanager.lua Sun Jun 21 19:15:59 2009 +0500 +++ b/core/modulemanager.lua Tue Jun 23 02:15:04 2009 +0500 @@ -406,6 +406,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 })); return f(); end