Software /
code /
prosody
Comparison
plugins/mod_disco.lua @ 1700:255935c7a915
mod_disco: Added identity server/im with name 'Prosody'
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Tue, 18 Aug 2009 12:38:28 +0500 |
parent | 1699:53d16a28ee00 |
child | 1701:ceab61010f87 |
comparison
equal
deleted
inserted
replaced
1699:53d16a28ee00 | 1700:255935c7a915 |
---|---|
16 end); | 16 end); |
17 module:add_iq_handler({"c2s", "s2sin"}, "http://jabber.org/protocol/disco#items", function (session, stanza) | 17 module:add_iq_handler({"c2s", "s2sin"}, "http://jabber.org/protocol/disco#items", function (session, stanza) |
18 session.send(discomanager_handle(stanza)); | 18 session.send(discomanager_handle(stanza)); |
19 end); | 19 end); |
20 | 20 |
21 module:add_identity("server", "im", "Prosody"); | |
21 local st = require "util.stanza" | 22 local st = require "util.stanza" |
22 module:hook("iq/host/http://jabber.org/protocol/disco#info:query", function(event) | 23 module:hook("iq/host/http://jabber.org/protocol/disco#info:query", function(event) |
23 local origin, stanza = event.origin, event.stanza; | 24 local origin, stanza = event.origin, event.stanza; |
24 if stanza.attr.type ~= "get" then return; end | 25 if stanza.attr.type ~= "get" then return; end |
25 local node = stanza.tags[1].attr.node; | 26 local node = stanza.tags[1].attr.node; |