Software /
code /
prosody
Comparison
core/modulemanager.lua @ 695:3384f2784795
modulemanager: Change pairs() to ipairs() to allow ordered module loading
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Mon, 12 Jan 2009 03:27:18 +0000 |
parent | 686:13ed38531f69 |
child | 698:d8a678e40a0a |
comparison
equal
deleted
inserted
replaced
694:b97b05261156 | 695:3384f2784795 |
---|---|
66 local modules_enabled = config.get("*", "core", "modules_enabled"); | 66 local modules_enabled = config.get("*", "core", "modules_enabled"); |
67 local modules_disabled = config.get(host, "core", "modules_disabled"); | 67 local modules_disabled = config.get(host, "core", "modules_disabled"); |
68 local disabled_set = {}; | 68 local disabled_set = {}; |
69 if modules_enabled then | 69 if modules_enabled then |
70 if modules_disabled then | 70 if modules_disabled then |
71 for _, module in pairs(modules_disabled) do | 71 for _, module in ipairs(modules_disabled) do |
72 disabled_set[module] = true; | 72 disabled_set[module] = true; |
73 end | 73 end |
74 end | 74 end |
75 for _, module in pairs(modules_enabled) do | 75 for _, module in ipairs(modules_enabled) do |
76 if not disabled_set[module] then | 76 if not disabled_set[module] then |
77 load(host, module); | 77 load(host, module); |
78 end | 78 end |
79 end | 79 end |
80 end | 80 end |