Changeset

1366:54b5121b6c83

componentmanager: Using prosody.events instead of core.eventmanager
author Waqas Hussain <waqas20@gmail.com>
date Sat, 20 Jun 2009 14:38:22 +0500
parents 1365:864a99eff6d7
children 1367:e4d660e58dfc
files core/componentmanager.lua
diffstat 1 files changed, 3 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- 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);