Diff

core/componentmanager.lua @ 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
parent 1264:498293bce4bf
child 1434:b5d4db71ef1a
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);