plugins/muc/muc.lib.lua
changeset 1996 3e6b36c6d7b7
parent 1989 97c3236cc4ac
child 1997 c70ee886e309
equal deleted inserted replaced
1995:03ecc636af1e 1996:3e6b36c6d7b7
   349 		else
   349 		else
   350 			origin.send(st.error_reply(stanza, "cancel", "not-acceptable"));
   350 			origin.send(st.error_reply(stanza, "cancel", "not-acceptable"));
   351 		end
   351 		end
   352 	elseif stanza.name == "message" and type == "groupchat" then -- groupchat messages not allowed in PM
   352 	elseif stanza.name == "message" and type == "groupchat" then -- groupchat messages not allowed in PM
   353 		origin.send(st.error_reply(stanza, "modify", "bad-request"));
   353 		origin.send(st.error_reply(stanza, "modify", "bad-request"));
       
   354 	elseif current_nick and stanza.name == "message" and type == "error" and get_kickable_error(stanza) then
       
   355 		log("debug", "%s kicked from %s for sending an error message", current_nick, self.jid);
       
   356 		self:handle_to_occupant(origin, st.presence({type='unavailable', from=stanza.attr.from, to=stanza.attr.to})
       
   357 			:tag('status'):text('This participant is kicked from the room because he sent an error message to another occupant')); -- send unavailable
   354 	else -- private stanza
   358 	else -- private stanza
   355 		local o_data = self._occupants[to];
   359 		local o_data = self._occupants[to];
   356 		if o_data then
   360 		if o_data then
   357 			log("debug", "%s sent private stanza to %s (%s)", from, to, o_data.jid);
   361 			log("debug", "%s sent private stanza to %s (%s)", from, to, o_data.jid);
   358 			local jid = o_data.jid;
   362 			local jid = o_data.jid;