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 58d48a211e
commit e9c8ead829
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();