MUC/lock: Fix locking timeout to account for the direction of time
authorKim Alvefur <zash@zash.se>
Wed, 07 Mar 2018 19:18:35 +0100
changeset 8569 8ea66e42a27b
parent 8568 301e5b82b4d8
child 8570 93695bb1f0e7
MUC/lock: Fix locking timeout to account for the direction of time
plugins/muc/lock.lib.lua
--- a/plugins/muc/lock.lib.lua	Wed Mar 07 19:17:48 2018 +0100
+++ b/plugins/muc/lock.lib.lua	Wed Mar 07 19:18:35 2018 +0100
@@ -23,7 +23,7 @@
 local function is_locked(room)
 	local ts = room._data.locked;
 	if ts then
-		if ts < os.time() then return true; end
+		if os.time() < ts then return true; end
 		unlock(room);
 	end
 	return false;