added differentation between restricted clients and clients with not enough time in ebanlist command
This commit is contained in:
parent
3da429b91f
commit
1cc618ed04
@ -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;
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user