equal
deleted
inserted
replaced
7 -- COPYING file in the source package for more information. |
7 -- COPYING file in the source package for more information. |
8 -- |
8 -- |
9 |
9 |
10 local st = require "util.stanza"; |
10 local st = require "util.stanza"; |
11 |
11 |
12 local lock_rooms = module:get_option_boolean("muc_room_locking", false); |
12 local lock_rooms = module:get_option_boolean("muc_room_locking", true); |
13 local lock_room_timeout = module:get_option_number("muc_room_lock_timeout", 300); |
13 local lock_room_timeout = module:get_option_number("muc_room_lock_timeout", 300); |
14 |
14 |
15 local function lock(room) |
15 local function lock(room) |
16 module:fire_event("muc-room-locked", {room = room;}); |
16 module:fire_event("muc-room-locked", {room = room;}); |
17 room._data.locked = os.time() + lock_room_timeout; |
17 room._data.locked = os.time() + lock_room_timeout; |