Mercurial > prosody-hg
comparison plugins/muc/muc.lib.lua @ 1819:ed1911be26c7
MUC: Added legacy error code to the presence error returned when a banned user attempts to join.
| author | Waqas Hussain <waqas20@gmail.com> |
|---|---|
| date | Fri, 25 Sep 2009 03:23:31 +0500 |
| parents | a394e0bd4847 |
| children | 8e66c9d09f81 |
comparison
equal
deleted
inserted
replaced
| 1818:a394e0bd4847 | 1819:ed1911be26c7 |
|---|---|
| 290 self:send_occupant_list(from); | 290 self:send_occupant_list(from); |
| 291 pr.attr.from = to; | 291 pr.attr.from = to; |
| 292 self:broadcast_presence(pr); | 292 self:broadcast_presence(pr); |
| 293 self:send_history(from); | 293 self:send_history(from); |
| 294 else -- banned | 294 else -- banned |
| 295 origin.send(st.error_reply(stanza, "auth", "forbidden"):tag("x", {xmlns = "http://jabber.org/protocol/muc"})); | 295 local reply = st.error_reply(stanza, "auth", "forbidden"):up(); |
| 296 reply.tags[1].attr.code = "403"; | |
| 297 origin.send(reply:tag("x", {xmlns = "http://jabber.org/protocol/muc"})); | |
| 296 end | 298 end |
| 297 end | 299 end |
| 298 end | 300 end |
| 299 elseif type ~= 'result' then -- bad type | 301 elseif type ~= 'result' then -- bad type |
| 300 origin.send(st.error_reply(stanza, "modify", "bad-request")); -- FIXME correct error? | 302 origin.send(st.error_reply(stanza, "modify", "bad-request")); -- FIXME correct error? |
