# HG changeset patch # User Matthew Wild # Date 1247146624 -3600 # Node ID e19cb945c25b923b13604cd1c17c5d0d86667722 # Parent 9d8c35e98ca21ddbee3bdc22f93d38b397260d03 modulemanager: Small code improvement, move autoloaded modules list to the top of the file diff -r 9d8c35e98ca2 -r e19cb945c25b core/modulemanager.lua --- 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