Software / code / prosody
Comparison
plugins/mod_legacyauth.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 st = require "util.stanza"; | 2 local st = require "util.stanza"; |
| 3 local t_concat = table.concat; | 3 local t_concat = table.concat; |
| 4 | 4 |
| 5 require "core.discomanager".set("legacyauth", "jabber:iq:auth"); | 5 require "core.discomanager".set("legacyauth", "jabber:iq:auth"); |
| 6 | 6 |
| 7 add_iq_handler("c2s_unauthed", "jabber:iq:auth", | 7 module:add_iq_handler("c2s_unauthed", "jabber:iq:auth", |
| 8 function (session, stanza) | 8 function (session, stanza) |
| 9 local username = stanza.tags[1]:child_with_name("username"); | 9 local username = stanza.tags[1]:child_with_name("username"); |
| 10 local password = stanza.tags[1]:child_with_name("password"); | 10 local password = stanza.tags[1]:child_with_name("password"); |
| 11 local resource = stanza.tags[1]:child_with_name("resource"); | 11 local resource = stanza.tags[1]:child_with_name("resource"); |
| 12 if not (username and password and resource) then | 12 if not (username and password and resource) then |