MUC: Add a textual error message when the user isn't allowed to get/set config form.
authorWaqas Hussain <waqas20@gmail.com>
Thu, 24 Feb 2011 02:09:38 +0000 (07:09 +0500)
committerWaqas Hussain <waqas20@gmail.com>
Thu, 24 Feb 2011 02:09:38 +0000 (07:09 +0500)
plugins/muc/muc.lib.lua

index 8bbf0df2e7d35e2f74549b22499090786de08c22..c60d44aa999488cac335a36cd94323190e38b0c1 100644 (file)
@@ -798,7 +798,7 @@ function room_mt:handle_to_room(origin, stanza) -- presence changes and groupcha
                        end
                elseif xmlns == "http://jabber.org/protocol/muc#owner" and (type == "get" or type == "set") and stanza.tags[1].name == "query" then
                        if self:get_affiliation(stanza.attr.from) ~= "owner" then
-                               origin.send(st.error_reply(stanza, "auth", "forbidden"));
+                               origin.send(st.error_reply(stanza, "auth", "forbidden", "Only owners can configure rooms"));
                        elseif stanza.attr.type == "get" then
                                self:send_form(origin, stanza);
                        elseif stanza.attr.type == "set" then