From d397b1e10d0dc688f1ba973edc4fea5515227a13 Mon Sep 17 00:00:00 2001 From: Jackz Date: Thu, 20 Jul 2023 10:11:14 -0500 Subject: [PATCH] Fix dumb mistake --- scripting/l4d2_autorestart.sp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripting/l4d2_autorestart.sp b/scripting/l4d2_autorestart.sp index 078001b..cfdbc59 100644 --- a/scripting/l4d2_autorestart.sp +++ b/scripting/l4d2_autorestart.sp @@ -21,7 +21,7 @@ public Plugin myinfo = { url = "https://github.com/Jackzmc/sourcemod-plugins" }; -ConVar noHibernate; +ConVar cvar_hibernateWhenEmpty; public void OnPluginStart() { startupTime = GetTime(); @@ -31,7 +31,7 @@ public void OnPluginStart() { SetFailState("This plugin is for L4D/L4D2 only."); } - noHibernate = FindConVar("sv_hibernate_when_empty"); + cvar_hibernateWhenEmpty = FindConVar("sv_hibernate_when_empty"); RegAdminCmd("sm_request_restart", Command_RequestRestart, ADMFLAG_GENERIC); @@ -60,7 +60,7 @@ public Action Timer_Check(Handle h) { } else if(GetTime() - startupTime > MAX_TIME_ONLINE_SECONDS) { LogAction(0, -1, "Server has passed max online time threshold, will restart if remains empty"); pendingRestart = true; - noHibernate.BoolValue = true; + cvar_hibernateWhenEmpty.BoolValue = false; if(IsServerEmpty()) { if(++triesEmpty > 4) { LogAction(0, -1, "Server has passed max online time threshold and is empty after %d tries, restarting now", triesEmpty); @@ -78,7 +78,7 @@ public Action Timer_Check(Handle h) { public void OnConfigsExecuted() { // Reset no hibernate setting when level changes: if(pendingRestart) { - noHibernate.BoolValue = true; + cvar_hibernateWhenEmpty.BoolValue = false; } }