Do not check for expired bans without database

This commit is contained in:
Timo Smit 2020-03-19 19:57:01 +01:00
parent 506db84674
commit 53e411f862
1 changed files with 3 additions and 1 deletions

View File

@ -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)