From 78b7d59dd11a4fc296e5a52000855e5ae0e2dc98 Mon Sep 17 00:00:00 2001 From: Rushaway Date: Mon, 2 Nov 2026 09:13:41 +0100 Subject: [PATCH] fix: no success message when the color is not set ChangeSingleColor() printed "Successfully set" even when SetColor() refused the change (banned player, invalid client). Co-Authored-By: Claude Opus 5.5 --- addons/sourcemod/scripting/CustomChatColors.sp | 6 ++++-- addons/sourcemod/scripting/include/ccc.inc | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/addons/sourcemod/scripting/CustomChatColors.sp b/addons/sourcemod/scripting/CustomChatColors.sp index 3167fcd..5ae311b 100644 --- a/addons/sourcemod/scripting/CustomChatColors.sp +++ b/addons/sourcemod/scripting/CustomChatColors.sp @@ -2256,7 +2256,8 @@ bool ChangeSingleColor(int client, int iTarget, char Key[64], char sCol[64], boo if (sCol[0] != '#') Format(sCol, sizeof(sCol), "#%s", sCol); - SetColor(Key, sCol, iTarget, bAdmin); + if (!SetColor(Key, sCol, iTarget, bAdmin)) + return false; char sColDisplay[128]; Format(sColDisplay, sizeof(sColDisplay), "\x07%s%s", sCol[0], sCol[0]); @@ -2277,7 +2278,8 @@ bool ChangeSingleColor(int client, int iTarget, char Key[64], char sCol[64], boo return false; } - SetColor(Key, sCol, iTarget, bAdmin); + if (!SetColor(Key, sCol, iTarget, bAdmin)) + return false; char sColDisplay[128]; Format(sColDisplay, sizeof(sColDisplay), "{%s}%s", sCol[0], sCol[0]); diff --git a/addons/sourcemod/scripting/include/ccc.inc b/addons/sourcemod/scripting/include/ccc.inc index c629ccb..0add2ad 100644 --- a/addons/sourcemod/scripting/include/ccc.inc +++ b/addons/sourcemod/scripting/include/ccc.inc @@ -11,7 +11,7 @@ #define CCC_V_MAJOR "8" #define CCC_V_MINOR "1" -#define CCC_V_PATCH "0" +#define CCC_V_PATCH "2" #define CCC_VERSION CCC_V_MAJOR..."."...CCC_V_MINOR..."."...CCC_V_PATCH