Comparison

plugins/muc/lock.lib.lua @ 8565:301e5b82b4d8

MUC/lock: Remove redundant fallback value
author Kim Alvefur <zash@zash.se>
date Wed, 07 Mar 2018 19:17:48 +0100
parent 7999:980606856882
child 8566:8ea66e42a27b
comparison
equal deleted inserted replaced
8564:fd41dc4a78e9 8565:301e5b82b4d8
19 local function unlock(room) 19 local function unlock(room)
20 module:fire_event("muc-room-unlocked", {room = room;}); 20 module:fire_event("muc-room-unlocked", {room = room;});
21 room._data.locked = nil; 21 room._data.locked = nil;
22 end 22 end
23 local function is_locked(room) 23 local function is_locked(room)
24 local ts = room._data.locked or false; 24 local ts = room._data.locked;
25 if ts then 25 if ts then
26 if ts < os.time() then return true; end 26 if ts < os.time() then return true; end
27 unlock(room); 27 unlock(room);
28 end 28 end
29 return false; 29 return false;