# HG changeset patch # User Waqas Hussain # Date 1265848493 -18000 # Node ID 5091548a3805f16f90bc01c867b86595da693aa4 # Parent cb1f9266130bf4196a888828b105bd713c25263a modulemanager: Make the plugin environment available directly (module.environment within plugins). diff -r cb1f9266130b -r 5091548a3805 core/modulemanager.lua --- a/core/modulemanager.lua Thu Feb 11 05:21:03 2010 +0500 +++ b/core/modulemanager.lua Thu Feb 11 05:34:53 2010 +0500 @@ -127,6 +127,7 @@ 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