aboutsummaryrefslogtreecommitdiffstats
path: root/core/configmanager.lua
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2009-03-03 17:18:43 +0000
committerMatthew Wild <mwild1@gmail.com>2009-03-03 17:18:43 +0000
commit3d1e8c5ab3d7417d10199545a757b1ec2c5df83c (patch)
tree45036a478086aff40557982433574d35781631d8 /core/configmanager.lua
parent7a7a89844a038b071f02fd1af309ba9ebbcda7de (diff)
parentfa16fb21e674614029fb3ed2d1445bba9b058d03 (diff)
downloadprosody-3d1e8c5ab3d7417d10199545a757b1ec2c5df83c.tar.gz
prosody-3d1e8c5ab3d7417d10199545a757b1ec2c5df83c.zip
Automated merge with http://luaetta.ath.cx:1234/
Diffstat (limited to 'core/configmanager.lua')
-rw-r--r--core/configmanager.lua14
1 files changed, 8 insertions, 6 deletions
diff --git a/core/configmanager.lua b/core/configmanager.lua
index 049862c2..036b6b21 100644
--- a/core/configmanager.lua
+++ b/core/configmanager.lua
@@ -9,8 +9,8 @@
local _G = _G;
-local setmetatable, loadfile, pcall, rawget, rawset, io, error, dofile =
- setmetatable, loadfile, pcall, rawget, rawset, io, error, dofile;
+local setmetatable, loadfile, pcall, rawget, rawset, io, error, dofile, type =
+ setmetatable, loadfile, pcall, rawget, rawset, io, error, dofile, type;
module "configmanager"
@@ -117,10 +117,12 @@ do
function env.Component(name)
return function (module)
- set(name, "core", "component_module", module);
- -- Don't load the global modules by default
- set(name, "core", "modules_enable", false);
- rawset(env, "__currenthost", name);
+ if type(module) == "string" then
+ set(name, "core", "component_module", module);
+ -- Don't load the global modules by default
+ set(name, "core", "modules_enable", false);
+ rawset(env, "__currenthost", name);
+ end
end
end
env.component = env.Component;