equal
deleted
inserted
replaced
49 if not password or password == "" then password = nil; end |
49 if not password or password == "" then password = nil; end |
50 if get_password(room) ~= password then |
50 if get_password(room) ~= password then |
51 local from, to = stanza.attr.from, stanza.attr.to; |
51 local from, to = stanza.attr.from, stanza.attr.to; |
52 module:log("debug", "%s couldn't join due to invalid password: %s", from, to); |
52 module:log("debug", "%s couldn't join due to invalid password: %s", from, to); |
53 local reply = st.error_reply(stanza, "auth", "not-authorized", nil, room.jid):up(); |
53 local reply = st.error_reply(stanza, "auth", "not-authorized", nil, room.jid):up(); |
54 reply.tags[1].attr.code = "401"; |
|
55 event.origin.send(reply:tag("x", {xmlns = "http://jabber.org/protocol/muc"})); |
54 event.origin.send(reply:tag("x", {xmlns = "http://jabber.org/protocol/muc"})); |
56 return true; |
55 return true; |
57 end |
56 end |
58 end, -20); |
57 end, -20); |
59 |
58 |