modulemanager: Added module.path to the plugin API to let plugins determine their...
authorWaqas Hussain <waqas20@gmail.com>
Sun, 20 Feb 2011 15:06:38 +0000 (20:06 +0500)
committerWaqas Hussain <waqas20@gmail.com>
Sun, 20 Feb 2011 15:06:38 +0000 (20:06 +0500)
core/modulemanager.lua

index e8f76aeb1d00b7147caab393031c0f9388670549..07a2b1c92011f71414cdccbd9963b7b5d3c497dd 100644 (file)
@@ -117,7 +117,7 @@ function load(host, module_name, config)
        end
 
        local _log = logger.init(host..":"..module_name);
-       local api_instance = setmetatable({ name = module_name, host = host, config = config,  _log = _log, log = function (self, ...) return _log(...); end }, { __index = api });
+       local api_instance = setmetatable({ name = module_name, host = host, path = err, config = config,  _log = _log, log = function (self, ...) return _log(...); end }, { __index = api });
 
        local pluginenv = setmetatable({ module = api_instance }, { __index = _G });
        api_instance.environment = pluginenv;