Software /
code /
prosody
Comparison
core/configmanager.lua @ 913:3e2dac84017d
core.configmanager: Make components use 'component' module by default if none specified
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Sun, 22 Mar 2009 15:33:38 +0000 |
parent | 896:2c0b9e3c11c3 |
child | 1000:a73715a9267f |
comparison
equal
deleted
inserted
replaced
912:62dd71870ee3 | 913:3e2dac84017d |
---|---|
114 set(name or "*", "core", "defined", true); | 114 set(name or "*", "core", "defined", true); |
115 end | 115 end |
116 env.host = env.Host; | 116 env.host = env.Host; |
117 | 117 |
118 function env.Component(name) | 118 function env.Component(name) |
119 set(name, "core", "component_module", "component"); | |
120 -- Don't load the global modules by default | |
121 set(name, "core", "modules_enable", false); | |
122 rawset(env, "__currenthost", name); | |
123 | |
119 return function (module) | 124 return function (module) |
120 if type(module) == "string" then | 125 if type(module) == "string" then |
121 set(name, "core", "component_module", module); | 126 set(name, "core", "component_module", module); |
122 -- Don't load the global modules by default | |
123 set(name, "core", "modules_enable", false); | |
124 rawset(env, "__currenthost", name); | |
125 end | 127 end |
126 end | 128 end |
127 end | 129 end |
128 env.component = env.Component; | 130 env.component = env.Component; |
129 | 131 |