Software /
code /
prosody
Changeset
2585:a9e99897b2e8
modulemanager: Load plugin libraries in the same environment as the plugins.
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Thu, 11 Feb 2010 05:36:03 +0500 |
parents | 2584:5091548a3805 |
children | 2586:26ead5e16cd3 |
files | core/modulemanager.lua |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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