Comparison

plugins/mod_roster.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 609:64849cfa9869
comparison
equal deleted inserted replaced
540:ec03f6968fa8 541:3521e0851c9e
27 local handle_outbound_presence_subscriptions_and_probes = require "core.presencemanager".handle_outbound_presence_subscriptions_and_probes; 27 local handle_outbound_presence_subscriptions_and_probes = require "core.presencemanager".handle_outbound_presence_subscriptions_and_probes;
28 local rm_remove_from_roster = require "core.rostermanager".remove_from_roster; 28 local rm_remove_from_roster = require "core.rostermanager".remove_from_roster;
29 local rm_add_to_roster = require "core.rostermanager".add_to_roster; 29 local rm_add_to_roster = require "core.rostermanager".add_to_roster;
30 local rm_roster_push = require "core.rostermanager".roster_push; 30 local rm_roster_push = require "core.rostermanager".roster_push;
31 31
32 require "core.discomanager".set("roster", "jabber:iq:roster"); 32 module:add_feature("jabber:iq:roster");
33 33
34 module:add_iq_handler("c2s", "jabber:iq:roster", 34 module:add_iq_handler("c2s", "jabber:iq:roster",
35 function (session, stanza) 35 function (session, stanza)
36 if stanza.tags[1].name == "query" then 36 if stanza.tags[1].name == "query" then
37 if stanza.attr.type == "get" then 37 if stanza.attr.type == "get" then