# HG changeset patch # User Waqas Hussain # Date 1280851620 -18000 # Node ID 2fde9cb97f7628b4118552ac43b1326e9fed6b65 # Parent e6a78e15fed23d90bf7bb1212f713f251f399b0b MUC: Return correct error to non-members attempting to enter a members-only room. diff -r e6a78e15fed2 -r 2fde9cb97f76 plugins/muc/muc.lib.lua --- a/plugins/muc/muc.lib.lua Tue Aug 03 20:05:58 2010 +0500 +++ b/plugins/muc/muc.lib.lua Tue Aug 03 21:07:00 2010 +0500 @@ -432,6 +432,10 @@ :tag("status", {code='110'})); end self:send_history(from, stanza); + elseif not affiliation then -- registration required for entering members-only room + local reply = st.error_reply(stanza, "auth", "registration-required"):up(); + reply.tags[1].attr.code = "407"; + origin.send(reply:tag("x", {xmlns = "http://jabber.org/protocol/muc"})); else -- banned local reply = st.error_reply(stanza, "auth", "forbidden"):up(); reply.tags[1].attr.code = "403";