mirror of
https://github.com/RaidMax/IW4M-Admin.git
synced 2025-06-10 15:20:48 -05:00
Mute Banner for Profile & Prevent Self-Target & Correctly Expire Early Unmutes (#272)
* Fix self-targeting
Remove creation of penalty on mute expiration
* Display mute penalties on profile
Expire mute penalties on unmute
* Resolves issues in code review
Added comment in ClientController.cs
Fixed order of operations in MuteManager.cs
Fixed condition in MuteManager.cs
* Fix self-targeting
Remove creation of penalty on mute expiration
* Display mute penalties on profile
Expire mute penalties on unmute
* Resolves issues in code review
Added comment in ClientController.cs
Fixed order of operations in MuteManager.cs
Fixed condition in MuteManager.cs
* Changed localisation value to be more generic
Fix null reference warning (it should never be null) (34da216
)
This commit is contained in:
@ -131,7 +131,7 @@ namespace SharedLibraryCore.Services
|
||||
}
|
||||
|
||||
private static readonly EFPenalty.PenaltyType[] LinkedPenalties =
|
||||
{ EFPenalty.PenaltyType.Ban, EFPenalty.PenaltyType.Flag, EFPenalty.PenaltyType.TempBan };
|
||||
{ EFPenalty.PenaltyType.Ban, EFPenalty.PenaltyType.Flag, EFPenalty.PenaltyType.TempBan, EFPenalty.PenaltyType.TempMute, EFPenalty.PenaltyType.Mute };
|
||||
|
||||
private static readonly Expression<Func<EFPenalty, bool>> Filter = p =>
|
||||
LinkedPenalties.Contains(p.Type) && p.Active && (p.Expires == null || p.Expires > DateTime.UtcNow);
|
||||
|
Reference in New Issue
Block a user