plugins/muc/mod_muc.lua
changeset 5058 433cc9a4c7e9
parent 5016 56a0b13a3d42
child 5062 88e198d65905
--- a/plugins/muc/mod_muc.lua	Tue Jul 31 08:23:55 2012 +0200
+++ b/plugins/muc/mod_muc.lua	Wed Aug 01 01:36:11 2012 +0500
@@ -135,6 +135,10 @@
 	local bare = jid_bare(stanza.attr.to);
 	local room = rooms[bare];
 	if not room then
+		if stanza.name ~= "presence" then
+			origin.send(st.error_reply(stanza, "cancel", "item-not-found"));
+			return true;
+		end
 		if not(restrict_room_creation) or
 		  (restrict_room_creation == "admin" and is_admin(stanza.attr.from)) or
 		  (restrict_room_creation == "local" and select(2, jid_split(stanza.attr.from)) == module.host:gsub("^[^%.]+%.", "")) then