diff options
Diffstat (limited to 'plugins/muc/mod_muc.lua')
-rw-r--r-- | plugins/muc/mod_muc.lua | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/plugins/muc/mod_muc.lua b/plugins/muc/mod_muc.lua index a3c6cb81..6ba0ffb5 100644 --- a/plugins/muc/mod_muc.lua +++ b/plugins/muc/mod_muc.lua @@ -253,8 +253,12 @@ module:hook("host-disco-items", function(event) end end); -module:hook("muc-room-created", function(event) - track_room(event.room); +module:hook("muc-room-pre-create", function(event) + local origin, stanza = event.origin, event.stanza; + if not track_room(event.room) then + origin.send(st.error_reply(stanza, "wait", "resource-constraint")); + return true; + end end, -1000); module:hook("muc-room-destroyed",function(event) |