Mercurial > prosody-modules
comparison mod_saslauth_muc/mod_saslauth_muc.lua @ 404:eb8b005d2a3d
mod_saslauth_muc: Report proper SASL error on auth failure.
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Thu, 25 Aug 2011 12:22:48 +0500 |
parents | 4c3abf1a9b5a |
children | 7dbde05b48a9 |
comparison
equal
deleted
inserted
replaced
403:fc62b26dfdf6 | 404:eb8b005d2a3d |
---|---|
32 _rooms[room_jid] = _rooms[room_jid] or {}; | 32 _rooms[room_jid] = _rooms[room_jid] or {}; |
33 _rooms[room_jid][jid] = new_sasl(module.host, { plain = function(sasl, username, realm) | 33 _rooms[room_jid][jid] = new_sasl(module.host, { plain = function(sasl, username, realm) |
34 local muc = hosts[module.host].modules.muc; | 34 local muc = hosts[module.host].modules.muc; |
35 local room = muc and muc.rooms[room_jid]; | 35 local room = muc and muc.rooms[room_jid]; |
36 local password = room and room:get_password(); | 36 local password = room and room:get_password(); |
37 local ret = password and true or false; | 37 local ret = password and true or nil; |
38 return password, true; | 38 return password or "", ret; |
39 end }); | 39 end }); |
40 _rooms[room_jid][jid].timeout = os_time() + timeout; | 40 _rooms[room_jid][jid].timeout = os_time() + timeout; |
41 return _rooms[room_jid][jid]; | 41 return _rooms[room_jid][jid]; |
42 end | 42 end |
43 | 43 |