diff options
author | daurnimator <quae@daurnimator.com> | 2014-04-02 15:48:25 -0400 |
---|---|---|
committer | daurnimator <quae@daurnimator.com> | 2014-04-02 15:48:25 -0400 |
commit | cada6120bc227c8ae60d765c842ce699c311300e (patch) | |
tree | 342055a080eb3d25f22f61188e9ef858da594a09 /plugins/muc/mod_muc.lua | |
parent | 905c1a9c37d76e0e5322fbfc9629bbf07aa81638 (diff) | |
download | prosody-cada6120bc227c8ae60d765c842ce699c311300e.tar.gz prosody-cada6120bc227c8ae60d765c842ce699c311300e.zip |
plugins/muc: Move locking to seperate module
Diffstat (limited to 'plugins/muc/mod_muc.lua')
-rw-r--r-- | plugins/muc/mod_muc.lua | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/plugins/muc/mod_muc.lua b/plugins/muc/mod_muc.lua index 8b40d6ad..6f6094b4 100644 --- a/plugins/muc/mod_muc.lua +++ b/plugins/muc/mod_muc.lua @@ -23,8 +23,6 @@ if restrict_room_creation then restrict_room_creation = nil; end end -local lock_rooms = module:get_option_boolean("muc_room_locking", false); -local lock_room_timeout = module:get_option_number("muc_room_lock_timeout", 300); local muclib = module:require "muc"; local muc_new_room = muclib.new_room; @@ -47,6 +45,7 @@ module:depends("disco"); module:add_identity("conference", "text", muc_name); module:add_feature("http://jabber.org/protocol/muc"); module:depends "muc_unique" +module:require "muc/lock"; local function is_admin(jid) return um_is_admin(jid, module.host); @@ -94,20 +93,6 @@ function create_room(jid) return room; end -if lock_rooms then - module:hook("muc-room-created", function(event) - local room = event.room; - room:lock(); - if lock_room_timeout and lock_room_timeout > 0 then - module:add_timer(lock_room_timeout, function () - if room:is_locked() then - room:destroy(); -- Not unlocked in time - end - end); - end - end); -end - function forget_room(jid) rooms[jid] = nil; end |