fix issue with tempban not displaying properly

This commit is contained in:
RaidMax 2022-02-25 08:22:40 -06:00
parent 4ace476242
commit bd6c0dd5be
2 changed files with 12 additions and 7 deletions

View File

@ -66,8 +66,13 @@ OnPlayerConnect()
player thread OnPlayerSpawned();
player thread PlayerTrackingOnInterval();
// only toggle if it's enabled
if ( IsDefined( level.nightModeEnabled ) && level.nightModeEnabled )
{
player ToggleNightMode();
}
}
}
OnPlayerSpawned()

View File

@ -116,7 +116,7 @@ namespace SharedLibraryCore.Services
}
private static readonly EFPenalty.PenaltyType[] LinkedPenalties =
{ EFPenalty.PenaltyType.Ban, EFPenalty.PenaltyType.Flag };
{ EFPenalty.PenaltyType.Ban, EFPenalty.PenaltyType.Flag, EFPenalty.PenaltyType.TempBan };
private static readonly Expression<Func<EFPenalty, bool>> Filter = p =>
LinkedPenalties.Contains(p.Type) && p.Active && (p.Expires == null || p.Expires > DateTime.UtcNow);