mirror of
https://github.com/RaidMax/IW4M-Admin.git
synced 2025-06-13 00:28:10 -05:00
Display mute penalties on profile
Expire mute penalties on unmute
This commit is contained in:
@ -162,7 +162,12 @@ namespace WebfrontCore.Controllers
|
||||
});
|
||||
}
|
||||
|
||||
clientDto.ActivePenalty = activePenalties.OrderByDescending(_penalty => _penalty.Type).FirstOrDefault();
|
||||
clientDto.ActivePenalty = activePenalties.MaxBy(penalty => penalty.Type switch
|
||||
{
|
||||
EFPenalty.PenaltyType.TempMute => 0,
|
||||
EFPenalty.PenaltyType.Mute => 1,
|
||||
_ => (int)penalty.Type
|
||||
});
|
||||
clientDto.Meta.AddRange(Authorized ? meta : meta.Where(m => !m.IsSensitive));
|
||||
|
||||
var strippedName = clientDto.Name.StripColors();
|
||||
|
Reference in New Issue
Block a user