30 local type = type; |
30 local type = type; |
31 local next = next; |
31 local next = next; |
32 local rawget = rawget; |
32 local rawget = rawget; |
33 local error = error; |
33 local error = error; |
34 local tostring = tostring; |
34 local tostring = tostring; |
|
35 |
|
36 local autoload_modules = {"presence", "message", "iq"}; |
35 |
37 |
36 -- We need this to let modules access the real global namespace |
38 -- We need this to let modules access the real global namespace |
37 local _G = _G; |
39 local _G = _G; |
38 |
40 |
39 module "modulemanager" |
41 module "modulemanager" |
68 if modules_disabled then |
70 if modules_disabled then |
69 for _, module in ipairs(modules_disabled) do |
71 for _, module in ipairs(modules_disabled) do |
70 disabled_set[module] = true; |
72 disabled_set[module] = true; |
71 end |
73 end |
72 end |
74 end |
73 for _, module in ipairs({"presence", "message", "iq"}) do |
75 for _, module in ipairs(autoload_modules) do |
74 if not disabled_set[module] then |
76 if not disabled_set[module] then |
75 load(host, module); |
77 load(host, module); |
76 end |
78 end |
77 end |
79 end |
78 for _, module in ipairs(modules_enabled) do |
80 for _, module in ipairs(modules_enabled) do |