mirror of
https://github.com/minetest-mods/xban2.git
synced 2025-04-30 13:41:40 -04:00
updated init lua
should work now
This commit is contained in:
parent
fe12b598ff
commit
2368845173
1 changed files with 14 additions and 1 deletions
15
init.lua
15
init.lua
|
@ -384,9 +384,22 @@ local function load_db()
|
||||||
else
|
else
|
||||||
local wwe = entry
|
local wwe = entry
|
||||||
wwe.expires = now + MAX_BAN_TIME
|
wwe.expires = now + MAX_BAN_TIME
|
||||||
table.insert(tempbans, )
|
table.insert(tempbans, entry)
|
||||||
end
|
end
|
||||||
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
|
end
|
||||||
|
|
||||||
minetest.register_chatcommand("xban_cleanup", {
|
minetest.register_chatcommand("xban_cleanup", {
|
||||||
|
|
Loading…
Add table
Reference in a new issue