Thu, 09 Jul 2009 14:37:04 +0100
modulemanager: Small code improvement, move autoloaded modules list to the top of the file
core/modulemanager.lua | file | annotate | diff | comparison | revisions |
--- a/core/modulemanager.lua Thu Jul 09 14:34:49 2009 +0100 +++ b/core/modulemanager.lua Thu Jul 09 14:37:04 2009 +0100 @@ -33,6 +33,8 @@ local error = error; local tostring = tostring; +local autoload_modules = {"presence", "message", "iq"}; + -- We need this to let modules access the real global namespace local _G = _G; @@ -70,7 +72,7 @@ disabled_set[module] = true; end end - for _, module in ipairs({"presence", "message", "iq"}) do + for _, module in ipairs(autoload_modules) do if not disabled_set[module] then load(host, module); end