Software /
code /
prosody
Changeset
1393:576143941a76
modulemanager: Enabled access to the module API from plugin libraries
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Tue, 23 Jun 2009 02:15:04 +0500 |
parents | 1392:9935ddfd8ccf |
children | 1394:2ebed659b958 |
files | core/modulemanager.lua |
diffstat | 1 files changed, 1 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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