MUC: Added legacy error code to the presence error returned when a banned user attempts to join.

Fri, 25 Sep 2009 03:23:31 +0500

author
Waqas Hussain <waqas20@gmail.com>
date
Fri, 25 Sep 2009 03:23:31 +0500
changeset 1819
ed1911be26c7
parent 1818
a394e0bd4847
child 1823
7c3ec7ac6316

MUC: Added legacy error code to the presence error returned when a banned user attempts to join.

plugins/muc/muc.lib.lua file | annotate | diff | comparison | revisions
--- a/plugins/muc/muc.lib.lua	Fri Sep 25 03:21:57 2009 +0500
+++ b/plugins/muc/muc.lib.lua	Fri Sep 25 03:23:31 2009 +0500
@@ -292,7 +292,9 @@
 						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

mercurial