1
0
mirror of https://github.com/RaidMax/IW4M-Admin.git synced 2025-06-10 07:13:58 -05:00

simplify level update so we don't have to worry about linked account levels

This commit is contained in:
RaidMax
2022-02-28 15:20:46 -06:00
parent c6866fd3d5
commit c22bfed99d
2 changed files with 14 additions and 41 deletions

View File

@ -53,6 +53,14 @@ namespace WebfrontCore.Controllers
client.SetAdditionalProperty(EFMeta.ClientTag, tag.LinkedMeta.Value);
}
// even though we haven't set their level to "banned" yet
// (ie they haven't reconnected with the infringing player identifier)
// we want to show them as banned as to not confuse people.
if (activePenalties.Any(penalty => penalty.Type == EFPenalty.PenaltyType.Ban))
{
client.Level = Data.Models.Client.EFClient.Permission.Banned;
}
var displayLevelInt = (int)client.Level;
var displayLevel = client.Level.ToLocalizedLevelName();