Software /
code /
prosody
Comparison
core/componentmanager.lua @ 1705:99c9f59ed365
componentmanager: Removed disco#items hook, and reference to core.discomanager
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Tue, 18 Aug 2009 12:47:37 +0500 |
parent | 1693:56e23b0b3893 |
child | 1772:c0ba9cd6ee63 |
comparison
equal
deleted
inserted
replaced
1704:9b445d2427e2 | 1705:99c9f59ed365 |
---|---|
3 -- Copyright (C) 2008-2009 Waqas Hussain | 3 -- Copyright (C) 2008-2009 Waqas Hussain |
4 -- | 4 -- |
5 -- This project is MIT/X11 licensed. Please see the | 5 -- This project is MIT/X11 licensed. Please see the |
6 -- COPYING file in the source package for more information. | 6 -- COPYING file in the source package for more information. |
7 -- | 7 -- |
8 | |
9 | |
10 | 8 |
11 local prosody = prosody; | 9 local prosody = prosody; |
12 local log = require "util.logger".init("componentmanager"); | 10 local log = require "util.logger".init("componentmanager"); |
13 local configmanager = require "core.configmanager"; | 11 local configmanager = require "core.configmanager"; |
14 local modulemanager = require "core.modulemanager"; | 12 local modulemanager = require "core.modulemanager"; |
23 | 21 |
24 local components = {}; | 22 local components = {}; |
25 | 23 |
26 local disco_items = require "util.multitable".new(); | 24 local disco_items = require "util.multitable".new(); |
27 local NULL = {}; | 25 local NULL = {}; |
28 require "core.discomanager".addDiscoItemsHandler("*host", function(reply, to, from, node) | |
29 if #node == 0 and hosts[to] then | |
30 for jid in pairs(disco_items:get(to) or NULL) do | |
31 reply:tag("item", {jid = jid}):up(); | |
32 end | |
33 return true; | |
34 end | |
35 end); | |
36 | 26 |
37 prosody.events.add_handler("server-starting", function () core_route_stanza = _G.core_route_stanza; end); | 27 prosody.events.add_handler("server-starting", function () core_route_stanza = _G.core_route_stanza; end); |
38 | 28 |
39 module "componentmanager" | 29 module "componentmanager" |
40 | 30 |