From 1cc618ed041927844650da63f8f4ae4375c8327b Mon Sep 17 00:00:00 2001 From: jenz Date: Thu, 8 Jan 2026 16:03:34 +0100 Subject: [PATCH] added differentation between restricted clients and clients with not enough time in ebanlist command --- .../entWatch-restrictions_playtime.sp | 25 ++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/entWatch4/scripting/entWatch-restrictions_playtime.sp b/entWatch4/scripting/entWatch-restrictions_playtime.sp index de0195b..ad49e8a 100644 --- a/entWatch4/scripting/entWatch-restrictions_playtime.sp +++ b/entWatch4/scripting/entWatch-restrictions_playtime.sp @@ -242,7 +242,9 @@ public Action Command_ClientUnrestrict(int client, int args) public Action Command_DisplayRestrictions(int client, int args) { char aBuf[1024]; + char aBuf_time_requirement[1024]; char aBuf2[MAX_NAME_LENGTH]; + char aBuf2_time_requirement[MAX_NAME_LENGTH]; for (int i = 1; i <= MaxClients; i++) { @@ -250,9 +252,18 @@ public Action Command_DisplayRestrictions(int client, int args) { if (ClientRestricted(i)) { - GetClientName(i, aBuf2, sizeof(aBuf2)); - StrCat(aBuf, sizeof(aBuf), aBuf2); - StrCat(aBuf, sizeof(aBuf), ", "); + if (g_iClientHours[i] <= g_cvarHourRequirement.IntValue) + { + GetClientName(i, aBuf2_time_requirement, sizeof(aBuf2_time_requirement)); + StrCat(aBuf_time_requirement, sizeof(aBuf_time_requirement), aBuf2_time_requirement); + StrCat(aBuf_time_requirement, sizeof(aBuf_time_requirement), ", "); + } + else + { + GetClientName(i, aBuf2, sizeof(aBuf2)); + StrCat(aBuf, sizeof(aBuf), aBuf2); + StrCat(aBuf, sizeof(aBuf), ", "); + } } } } @@ -265,6 +276,14 @@ public Action Command_DisplayRestrictions(int client, int args) else CReplyToCommand(client, "\x07%s[entWatch] \x07%sCurrently restricted clients: \x07%snone", "E01B5D", "F16767", "EDEDED"); + if (strlen(aBuf_time_requirement)) + { + aBuf_time_requirement[strlen(aBuf_time_requirement) - 2] = 0; + CReplyToCommand(client, "\x07%s[entWatch] \x07%sCurrent clients with not enough playtime: \x07%s%s", "E01B5D", "F16767", "EDEDED", aBuf_time_requirement); + } + else + CReplyToCommand(client, "\x07%s[entWatch] \x07%sCurrent clients with not enough playtime: \x07%snone", "E01B5D", "F16767", "EDEDED"); + return Plugin_Handled; }