Do not check for expired mutes without database

This commit is contained in:
Timo Smit 2020-03-19 20:00:52 +01:00
parent 53e411f862
commit 5327c47e30

View file

@ -80,8 +80,10 @@ function mutes.checkLiveMutes()
end end
function mutes.onInit() function mutes.onInit()
storedMuteTimer = timers.add(mutes.checkStoredMutes, 60000, 0, false, false) if db.isConnected() then
liveMuteTimer = timers.add(mutes.checkLiveMutes, 1000, 0, false, false) storedMuteTimer = timers.add(mutes.checkStoredMutes, 60000, 0, false, false)
liveMuteTimer = timers.add(mutes.checkLiveMutes, 1000, 0, false, false)
end
end end
events.handle("onGameInit", mutes.onInit) events.handle("onGameInit", mutes.onInit)