Comparison

plugins/mod_roster.lua @ 438:193f9dd64f17

Bumper commit for the new modulemanager API \o/ Updates all the modules, though some more changes may be in store.
author Matthew Wild <mwild1@gmail.com>
date Thu, 27 Nov 2008 03:12:12 +0000
parent 421:63be85693710
child 519:cccd610a0ef9
comparison
equal deleted inserted replaced
437:c1a720db2157 438:193f9dd64f17
9 local rm_add_to_roster = require "core.rostermanager".add_to_roster; 9 local rm_add_to_roster = require "core.rostermanager".add_to_roster;
10 local rm_roster_push = require "core.rostermanager".roster_push; 10 local rm_roster_push = require "core.rostermanager".roster_push;
11 11
12 require "core.discomanager".set("roster", "jabber:iq:roster"); 12 require "core.discomanager".set("roster", "jabber:iq:roster");
13 13
14 add_iq_handler("c2s", "jabber:iq:roster", 14 module:add_iq_handler("c2s", "jabber:iq:roster",
15 function (session, stanza) 15 function (session, stanza)
16 if stanza.tags[1].name == "query" then 16 if stanza.tags[1].name == "query" then
17 if stanza.attr.type == "get" then 17 if stanza.attr.type == "get" then
18 local roster = st.reply(stanza) 18 local roster = st.reply(stanza)
19 :query("jabber:iq:roster"); 19 :query("jabber:iq:roster");