Mercurial > prosody-hg
comparison plugins/mod_legacyauth.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 |
| parents | cccd610a0ef9 |
| children | 4ae3e81513f3 |
comparison
equal
deleted
inserted
replaced
| 540:ec03f6968fa8 | 541:3521e0851c9e |
|---|---|
| 20 | 20 |
| 21 | 21 |
| 22 local st = require "util.stanza"; | 22 local st = require "util.stanza"; |
| 23 local t_concat = table.concat; | 23 local t_concat = table.concat; |
| 24 | 24 |
| 25 require "core.discomanager".set("legacyauth", "jabber:iq:auth"); | 25 module:add_feature("jabber:iq:auth"); |
| 26 | 26 |
| 27 module:add_iq_handler("c2s_unauthed", "jabber:iq:auth", | 27 module:add_iq_handler("c2s_unauthed", "jabber:iq:auth", |
| 28 function (session, stanza) | 28 function (session, stanza) |
| 29 local username = stanza.tags[1]:child_with_name("username"); | 29 local username = stanza.tags[1]:child_with_name("username"); |
| 30 local password = stanza.tags[1]:child_with_name("password"); | 30 local password = stanza.tags[1]:child_with_name("password"); |
