Comparison

plugins/mod_disco.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
2 local discomanager_handle = require "core.discomanager".handle; 2 local discomanager_handle = require "core.discomanager".handle;
3 3
4 require "core.discomanager".set("disco", "http://jabber.org/protocol/disco#info"); 4 require "core.discomanager".set("disco", "http://jabber.org/protocol/disco#info");
5 require "core.discomanager".set("disco", "http://jabber.org/protocol/disco#items"); 5 require "core.discomanager".set("disco", "http://jabber.org/protocol/disco#items");
6 6
7 add_iq_handler({"c2s", "s2sin"}, "http://jabber.org/protocol/disco#info", function (session, stanza) 7 module:add_iq_handler({"c2s", "s2sin"}, "http://jabber.org/protocol/disco#info", function (session, stanza)
8 session.send(discomanager_handle(stanza)); 8 session.send(discomanager_handle(stanza));
9 end); 9 end);
10 add_iq_handler({"c2s", "s2sin"}, "http://jabber.org/protocol/disco#items", function (session, stanza) 10 module:add_iq_handler({"c2s", "s2sin"}, "http://jabber.org/protocol/disco#items", function (session, stanza)
11 session.send(discomanager_handle(stanza)); 11 session.send(discomanager_handle(stanza));
12 end); 12 end);