From 53e411f86263e4fceaff16bdfd381ad13dd0cf05 Mon Sep 17 00:00:00 2001 From: Timo Smit Date: Thu, 19 Mar 2020 19:57:01 +0100 Subject: [PATCH] Do not check for expired bans without database --- luascripts/wolfadmin/admin/bans.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/luascripts/wolfadmin/admin/bans.lua b/luascripts/wolfadmin/admin/bans.lua index e96df10..4b204c5 100644 --- a/luascripts/wolfadmin/admin/bans.lua +++ b/luascripts/wolfadmin/admin/bans.lua @@ -58,7 +58,9 @@ function bans.checkStoredBans() end function bans.onInit() - storedBanTimer = timers.add(bans.checkStoredBans, 60000, 0, false, false) + if db.isConnected() then + storedBanTimer = timers.add(bans.checkStoredBans, 60000, 0, false, false) + end end events.handle("onGameInit", bans.onInit)