modulemanager: Small code improvement, move autoloaded modules list to the top of the file

Thu, 09 Jul 2009 14:37:04 +0100

author
Matthew Wild <mwild1@gmail.com>
date
Thu, 09 Jul 2009 14:37:04 +0100
changeset 1505
e19cb945c25b
parent 1504
9d8c35e98ca2
child 1506
2c8aa16b4f64

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

mercurial