From b20127b81a64bf5432ed21d7464b53c2995b8af2 Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Thu, 9 Jul 2009 14:37:04 +0100 Subject: modulemanager: Small code improvement, move autoloaded modules list to the top of the file --- core/modulemanager.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'core') diff --git a/core/modulemanager.lua b/core/modulemanager.lua index cc9e2686..56f8793a 100644 --- a/core/modulemanager.lua +++ b/core/modulemanager.lua @@ -33,6 +33,8 @@ local rawget = rawget; 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 @@ function load_modules_for_host(host) 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 -- cgit v1.2.3