From 2368845173e8f3d9cd75c718b2a0a0543fdc0a03 Mon Sep 17 00:00:00 2001 From: tigercoding56 <90169211+tigercoding56@users.noreply.github.com> Date: Sun, 23 Oct 2022 16:03:20 +0000 Subject: [PATCH] updated init lua should work now --- init.lua | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/init.lua b/init.lua index 664d4e9..81097b2 100644 --- a/init.lua +++ b/init.lua @@ -384,9 +384,22 @@ local function load_db() else local wwe = entry wwe.expires = now + MAX_BAN_TIME - table.insert(tempbans, ) + table.insert(tempbans, entry) end end + local i = 1 + while i <= #db do + if not db[i].banned then + -- not banned, remove from db + table.remove(db, i) + else + -- banned, hold entry back + i = i + 1 + if not db[i].expires then + db[i].expires = now + MAX_BAN_TIME + end + end + end minetest.register_chatcommand("xban_cleanup", {