plugins/muc/muc.lib.lua
changeset 1757 157e438823ba
parent 1756 b2291156a9c2
child 1764 c00d4ba8d2f3
equal deleted inserted replaced
1756:b2291156a9c2 1757:157e438823ba
   311 		end
   311 		end
   312 	end
   312 	end
   313 end
   313 end
   314 
   314 
   315 function room_mt:handle_form(origin, stanza)
   315 function room_mt:handle_form(origin, stanza)
   316 	if self:get_affiliation(stanza.attr.from) ~= "owner" then origin.send(st.error_reply(nil, "auth", "forbidden")); return; end
   316 	if self:get_affiliation(stanza.attr.from) ~= "owner" then origin.send(st.error_reply(stanza, "auth", "forbidden")); return; end
   317 	if stanza.attr.type == "get" then
   317 	if stanza.attr.type == "get" then
   318 		local title = "Configuration for "..self.jid;
   318 		local title = "Configuration for "..self.jid;
   319 		origin.send(st.reply(stanza):query("http://jabber.org/protocol/muc#owner")
   319 		origin.send(st.reply(stanza):query("http://jabber.org/protocol/muc#owner")
   320 			:tag("x", {xmlns='jabber:x:data', type='form'})
   320 			:tag("x", {xmlns='jabber:x:data', type='form'})
   321 				:tag("title"):text(title):up()
   321 				:tag("title"):text(title):up()