From 50c7a5297cc2fea88ddf9d3ba944546d12383500 Mon Sep 17 00:00:00 2001 From: Waqas Hussain Date: Sat, 20 Jun 2009 14:38:22 +0500 Subject: componentmanager: Using prosody.events instead of core.eventmanager --- core/componentmanager.lua | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/core/componentmanager.lua b/core/componentmanager.lua index fe4a6999..eb18fced 100644 --- a/core/componentmanager.lua +++ b/core/componentmanager.lua @@ -8,10 +8,9 @@ - +local prosody = prosody; local log = require "util.logger".init("componentmanager"); local configmanager = require "core.configmanager"; -local eventmanager = require "core.eventmanager"; local modulemanager = require "core.modulemanager"; local core_route_stanza = core_route_stanza; local jid_split = require "util.jid".split; @@ -34,7 +33,7 @@ require "core.discomanager".addDiscoItemsHandler("*host", function(reply, to, fr end end); -require "core.eventmanager".add_event_hook("server-starting", function () core_route_stanza = _G.core_route_stanza; end); +prosody.events.add_handler("server-starting", function () core_route_stanza = _G.core_route_stanza; end); module "componentmanager" @@ -63,7 +62,7 @@ function load_enabled_components(config) end end -eventmanager.add_event_hook("server-starting", load_enabled_components); +prosody.events.add_handler("server-starting", load_enabled_components); function handle_stanza(origin, stanza) local node, host = jid_split(stanza.attr.to); -- cgit v1.2.3