# HG changeset patch # User Waqas Hussain # Date 1343766971 -18000 # Node ID 433cc9a4c7e916850a66d9e416921b163a1de23f # Parent 1e44678b5de2e77787794d7de585a5920dbb01b0 MUC: Return on message and iq to non-existent rooms (thanks Maranda). diff -r 1e44678b5de2 -r 433cc9a4c7e9 plugins/muc/mod_muc.lua --- 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