Software /
code /
prosody
Comparison
plugins/mod_vcard.lua @ 541:3521e0851c9e
Change modules to use the new add_feature module API method.
This also fixes the bug causing disco features being added to every disco reply for every host.
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Thu, 04 Dec 2008 20:16:30 +0500 |
parent | 519:cccd610a0ef9 |
child | 549:c0947c0af398 |
comparison
equal
deleted
inserted
replaced
540:ec03f6968fa8 | 541:3521e0851c9e |
---|---|
26 local t_concat, t_insert = table.concat, table.insert; | 26 local t_concat, t_insert = table.concat, table.insert; |
27 | 27 |
28 require "util.jid" | 28 require "util.jid" |
29 local jid_split = jid.split; | 29 local jid_split = jid.split; |
30 | 30 |
31 require "core.discomanager".set("vcard", "vcard-temp"); | 31 module:add_feature("vcard-temp"); |
32 | 32 |
33 module:add_iq_handler({"c2s", "s2sin"}, "vcard-temp", | 33 module:add_iq_handler({"c2s", "s2sin"}, "vcard-temp", |
34 function (session, stanza) | 34 function (session, stanza) |
35 if stanza.tags[1].name == "vCard" then | 35 if stanza.tags[1].name == "vCard" then |
36 local to = stanza.attr.to; | 36 local to = stanza.attr.to; |