finer version numbers work correctly.

fix bug with level being reset.
add {{ADMINS}} to message tokens
modified offset threshold calculation
This commit is contained in:
RaidMax
2018-06-26 20:17:24 -05:00
parent e7c7145da1
commit 454238a192
12 changed files with 71 additions and 35 deletions

View File

@ -21,7 +21,11 @@ namespace WebfrontCore.ViewComponents
PunisherId = p.PunisherId,
PunisherName = p.Punisher.Name,
PunisherLevel = p.Punisher.Level.ToString(),
#if DEBUG
Offense = !string.IsNullOrEmpty(p.AutomatedOffense) ? p.AutomatedOffense : p.Offense,
#else
Offense = User.Identity.IsAuthenticated && !string.IsNullOrEmpty(p.AutomatedOffense) ? p.AutomatedOffense : p.Offense,
#endif
Type = p.Type.ToString(),
TimePunished = Utilities.GetTimePassed(p.When, false),
// show time passed if ban
@ -30,7 +34,11 @@ namespace WebfrontCore.ViewComponents
AutomatedOffense = p.AutomatedOffense
});
#if DEBUG
penaltiesDto = penaltiesDto.ToList();
#else
penaltiesDto = User.Identity.IsAuthenticated ? penaltiesDto.ToList() : penaltiesDto.Where(p => !p.Sensitive).ToList();
#endif
return View("_List", penaltiesDto);
}