plugins/muc/mod_muc.lua
changeset 8663 3b54f8472b51
parent 8662 4006755c1097
child 8664 7fc0784491ef
equal deleted inserted replaced
8662:4006755c1097 8663:3b54f8472b51
   251 			end
   251 			end
   252 		end
   252 		end
   253 	end
   253 	end
   254 end);
   254 end);
   255 
   255 
   256 module:hook("muc-room-created", function(event)
   256 module:hook("muc-room-pre-create", function(event)
   257 	track_room(event.room);
   257 	local origin, stanza = event.origin, event.stanza;
       
   258 	if not track_room(event.room) then
       
   259 		origin.send(st.error_reply(stanza, "wait", "resource-constraint"));
       
   260 		return true;
       
   261 	end
   258 end, -1000);
   262 end, -1000);
   259 
   263 
   260 module:hook("muc-room-destroyed",function(event)
   264 module:hook("muc-room-destroyed",function(event)
   261 	local room = event.room;
   265 	local room = event.room;
   262 	forget_room(room);
   266 	forget_room(room);