Software /
code /
prosody
Comparison
plugins/mod_disco.lua @ 1702:0e56819ee51b
mod_disco: Removed legacy IQ hooks
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Tue, 18 Aug 2009 12:42:56 +0500 |
parent | 1701:ceab61010f87 |
child | 1703:b062ee7865fc |
comparison
equal
deleted
inserted
replaced
1701:ceab61010f87 | 1702:0e56819ee51b |
---|---|
9 local discomanager_handle = require "core.discomanager".handle; | 9 local discomanager_handle = require "core.discomanager".handle; |
10 local componentmanager_get_children = require "core.componentmanager".get_children; | 10 local componentmanager_get_children = require "core.componentmanager".get_children; |
11 | 11 |
12 module:add_feature("http://jabber.org/protocol/disco#info"); | 12 module:add_feature("http://jabber.org/protocol/disco#info"); |
13 module:add_feature("http://jabber.org/protocol/disco#items"); | 13 module:add_feature("http://jabber.org/protocol/disco#items"); |
14 | |
15 module:add_iq_handler({"c2s", "s2sin"}, "http://jabber.org/protocol/disco#info", function (session, stanza) | |
16 session.send(discomanager_handle(stanza)); | |
17 end); | |
18 module:add_iq_handler({"c2s", "s2sin"}, "http://jabber.org/protocol/disco#items", function (session, stanza) | |
19 session.send(discomanager_handle(stanza)); | |
20 end); | |
21 | 14 |
22 module:add_identity("server", "im", "Prosody"); | 15 module:add_identity("server", "im", "Prosody"); |
23 local st = require "util.stanza" | 16 local st = require "util.stanza" |
24 module:hook("iq/host/http://jabber.org/protocol/disco#info:query", function(event) | 17 module:hook("iq/host/http://jabber.org/protocol/disco#info:query", function(event) |
25 local origin, stanza = event.origin, event.stanza; | 18 local origin, stanza = event.origin, event.stanza; |