404 local f, n = pluginloader.load_code(self.name, lib..".lib.lua"); |
404 local f, n = pluginloader.load_code(self.name, lib..".lib.lua"); |
405 if not f then |
405 if not f then |
406 f, n = pluginloader.load_code(lib, lib..".lib.lua"); |
406 f, n = pluginloader.load_code(lib, lib..".lib.lua"); |
407 end |
407 end |
408 if not f then error("Failed to load plugin library '"..lib.."', error: "..n); end -- FIXME better error message |
408 if not f then error("Failed to load plugin library '"..lib.."', error: "..n); end -- FIXME better error message |
|
409 setfenv(f, setmetatable({ module = self }, { __index = _G })); |
409 return f(); |
410 return f(); |
410 end |
411 end |
411 |
412 |
412 -------------------------------------------------------------------- |
413 -------------------------------------------------------------------- |
413 |
414 |