From c1dd6c2eded4db375fddcb56a942ee53b234735f Mon Sep 17 00:00:00 2001 From: Rushaway Date: Mon, 1 Jul 2024 22:40:22 +0200 Subject: [PATCH] fix: Prevent SQL error Database status was not verified before running the querie, leading a potential error. --- addons/sourcemod/scripting/entwatch/module_eban.inc | 3 +++ addons/sourcemod/scripting/entwatch_dz.sp | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/addons/sourcemod/scripting/entwatch/module_eban.inc b/addons/sourcemod/scripting/entwatch/module_eban.inc index 94617e6..45b0b43 100755 --- a/addons/sourcemod/scripting/entwatch/module_eban.inc +++ b/addons/sourcemod/scripting/entwatch/module_eban.inc @@ -72,6 +72,9 @@ stock void EWM_Eban_OnPluginStart() stock void EWM_Eban_OnClientPostAdminCheck(int iClient) { + if(g_iDBStatus != 4) + return; + char sTQuery[1024]; FormatEx(sTQuery, sizeof(sTQuery), "SELECT SUM(cnt) AS total_count " ... diff --git a/addons/sourcemod/scripting/entwatch_dz.sp b/addons/sourcemod/scripting/entwatch_dz.sp index 9afb718..761eaca 100644 --- a/addons/sourcemod/scripting/entwatch_dz.sp +++ b/addons/sourcemod/scripting/entwatch_dz.sp @@ -87,7 +87,7 @@ public Plugin myinfo = name = "EntWatch", author = "DarkerZ[RUS], AgentWesker, notkoen, sTc2201, maxime1907, Cmer, .Rushaway, Dolly", description = "Notify players about entity interactions.", - version = "3.DZ.59", + version = "3.DZ.60", url = "dark-skill.ru" };