Software /
code /
prosody
Comparison
plugins/mod_private.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 | 615:4ae3e81513f3 |
comparison
equal
deleted
inserted
replaced
540:ec03f6968fa8 | 541:3521e0851c9e |
---|---|
22 local st = require "util.stanza" | 22 local st = require "util.stanza" |
23 | 23 |
24 local jid_split = require "util.jid".split; | 24 local jid_split = require "util.jid".split; |
25 local datamanager = require "util.datamanager" | 25 local datamanager = require "util.datamanager" |
26 | 26 |
27 require "core.discomanager".set("private", "jabber:iq:private"); | 27 module:add_feature("jabber:iq:private"); |
28 | 28 |
29 module:add_iq_handler("c2s", "jabber:iq:private", | 29 module:add_iq_handler("c2s", "jabber:iq:private", |
30 function (session, stanza) | 30 function (session, stanza) |
31 local type = stanza.attr.type; | 31 local type = stanza.attr.type; |
32 local query = stanza.tags[1]; | 32 local query = stanza.tags[1]; |