From 5327c47e300df087ec037e7a2466107d8e661eea Mon Sep 17 00:00:00 2001 From: Timo Smit Date: Thu, 19 Mar 2020 20:00:52 +0100 Subject: [PATCH] Do not check for expired mutes without database --- luascripts/wolfadmin/admin/mutes.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/luascripts/wolfadmin/admin/mutes.lua b/luascripts/wolfadmin/admin/mutes.lua index f2a97cd..7026f96 100644 --- a/luascripts/wolfadmin/admin/mutes.lua +++ b/luascripts/wolfadmin/admin/mutes.lua @@ -80,8 +80,10 @@ function mutes.checkLiveMutes() end function mutes.onInit() - storedMuteTimer = timers.add(mutes.checkStoredMutes, 60000, 0, false, false) - liveMuteTimer = timers.add(mutes.checkLiveMutes, 1000, 0, false, false) + if db.isConnected() then + storedMuteTimer = timers.add(mutes.checkStoredMutes, 60000, 0, false, false) + liveMuteTimer = timers.add(mutes.checkLiveMutes, 1000, 0, false, false) + end end events.handle("onGameInit", mutes.onInit)