Comparison

plugins/muc/lock.lib.lua @ 8866:2c60ae791bdc

MUC: Enable room locking by default to gather feedback (#328)
author Kim Alvefur <zash@zash.se>
date Sun, 03 Jun 2018 14:46:57 +0200
parent 8566:8ea66e42a27b
child 10450:c1edeb9fe337
comparison
equal deleted inserted replaced
8865:2a8bbfcb6868 8866:2c60ae791bdc
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;