diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/moduleapi.lua | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/core/moduleapi.lua b/core/moduleapi.lua index 114a97a7..bdf9959f 100644 --- a/core/moduleapi.lua +++ b/core/moduleapi.lua @@ -137,10 +137,7 @@ function api:wrap_global(event, handler) end function api:require(lib) - local f, n = pluginloader.load_code(self.name, lib..".lib.lua", self.environment); - if not f then - f, n = pluginloader.load_code(lib, lib..".lib.lua", self.environment); - end + local f, n = pluginloader.load_code_ext(self.name, lib, "lib.lua", self.environment); if not f then error("Failed to load plugin library '"..lib.."', error: "..n); end -- FIXME better error message return f(); end |