aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/muc
diff options
context:
space:
mode:
authorWaqas Hussain <waqas20@gmail.com>2012-08-01 01:36:11 +0500
committerWaqas Hussain <waqas20@gmail.com>2012-08-01 01:36:11 +0500
commit7f39ebc04c3d0e3ef98efc7c8eeb3baa01f88c43 (patch)
tree1ece790f4b603730c8544d3ab10f4344392af939 /plugins/muc
parentd434226dbe1029b47f12569b7f91bddd90da621b (diff)
downloadprosody-7f39ebc04c3d0e3ef98efc7c8eeb3baa01f88c43.tar.gz
prosody-7f39ebc04c3d0e3ef98efc7c8eeb3baa01f88c43.zip
MUC: Return <item-not-found/> on message and iq to non-existent rooms (thanks Maranda).
Diffstat (limited to 'plugins/muc')
-rw-r--r--plugins/muc/mod_muc.lua4
1 files changed, 4 insertions, 0 deletions
diff --git a/plugins/muc/mod_muc.lua b/plugins/muc/mod_muc.lua
index 0fa172ee..7312157c 100644
--- a/plugins/muc/mod_muc.lua
+++ b/plugins/muc/mod_muc.lua
@@ -135,6 +135,10 @@ function stanza_handler(event)
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