# HG changeset patch # User Waqas Hussain # Date 1245490702 -18000 # Node ID 54b5121b6c83a2b6348fbe38a50240ed1a93f373 # Parent 864a99eff6d7f331906df335c3d2fe3746505491 componentmanager: Using prosody.events instead of core.eventmanager diff -r 864a99eff6d7 -r 54b5121b6c83 core/componentmanager.lua --- a/core/componentmanager.lua Sat Jun 20 14:35:31 2009 +0500 +++ b/core/componentmanager.lua Sat Jun 20 14:38:22 2009 +0500 @@ -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 @@ 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 @@ 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);