From c0f6d946e15e28b820fd7c0f301719c4c4425383 Mon Sep 17 00:00:00 2001 From: Waqas Hussain Date: Fri, 25 Sep 2009 03:23:31 +0500 Subject: MUC: Added legacy error code to the presence error returned when a banned user attempts to join. --- plugins/muc/muc.lib.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'plugins') diff --git a/plugins/muc/muc.lib.lua b/plugins/muc/muc.lib.lua index 43b8eb4f..6917b21a 100644 --- a/plugins/muc/muc.lib.lua +++ b/plugins/muc/muc.lib.lua @@ -292,7 +292,9 @@ function room_mt:handle_to_occupant(origin, stanza) -- PM, vCards, etc self:broadcast_presence(pr); self:send_history(from); else -- banned - origin.send(st.error_reply(stanza, "auth", "forbidden"):tag("x", {xmlns = "http://jabber.org/protocol/muc"})); + local reply = st.error_reply(stanza, "auth", "forbidden"):up(); + reply.tags[1].attr.code = "403"; + origin.send(reply:tag("x", {xmlns = "http://jabber.org/protocol/muc"})); end end end -- cgit v1.2.3