aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2009-10-17 13:31:39 +0100
committerMatthew Wild <mwild1@gmail.com>2009-10-17 13:31:39 +0100
commite380b86c9712a56ae613febb5cfdf7ec124f14d3 (patch)
tree29224eb9f55d1e6056e6d978ff85bfe4917c06d8
parentc3e3b43f1c291f0cf202d770a12963db3adb4d16 (diff)
downloadprosody-e380b86c9712a56ae613febb5cfdf7ec124f14d3.tar.gz
prosody-e380b86c9712a56ae613febb5cfdf7ec124f14d3.zip
componentmanager: Handle missing prosody object (helps us pass some tests)
-rw-r--r--core/componentmanager.lua6
1 files changed, 4 insertions, 2 deletions
diff --git a/core/componentmanager.lua b/core/componentmanager.lua
index 6f5e28e6..2d292c8f 100644
--- a/core/componentmanager.lua
+++ b/core/componentmanager.lua
@@ -6,7 +6,7 @@
-- COPYING file in the source package for more information.
--
-local prosody = prosody;
+local prosody = _G.prosody;
local log = require "util.logger".init("componentmanager");
local configmanager = require "core.configmanager";
local modulemanager = require "core.modulemanager";
@@ -51,7 +51,9 @@ function load_enabled_components(config)
end
end
-prosody.events.add_handler("server-starting", load_enabled_components);
+if prosody and prosody.events then
+ prosody.events.add_handler("server-starting", load_enabled_components);
+end
function handle_stanza(origin, stanza)
local node, host = jid_split(stanza.attr.to);