diff --git a/Plugins/ProfanityDeterment/Plugin.cs b/Plugins/ProfanityDeterment/Plugin.cs index 1eb54ca5..67712bc0 100644 --- a/Plugins/ProfanityDeterment/Plugin.cs +++ b/Plugins/ProfanityDeterment/Plugin.cs @@ -7,7 +7,6 @@ using SharedLibraryCore; using SharedLibraryCore.Configuration; using SharedLibraryCore.Database.Models; using SharedLibraryCore.Interfaces; -using SharedLibraryCore.Objects; namespace IW4MAdmin.Plugins.ProfanityDeterment { diff --git a/SharedLibraryCore/Objects/EFClient.cs b/SharedLibraryCore/Objects/EFClient.cs index c29bc29c..032740a2 100644 --- a/SharedLibraryCore/Objects/EFClient.cs +++ b/SharedLibraryCore/Objects/EFClient.cs @@ -566,7 +566,9 @@ namespace SharedLibraryCore.Database.Models #region CLIENT_GUID_TEMPBAN else { - var profileTempBan = ReceivedPenalties.FirstOrDefault(_penalty => _penalty.Type == Penalty.PenaltyType.TempBan && _penalty.Active); + var profileTempBan = ReceivedPenalties.FirstOrDefault(_penalty => _penalty.Type == Penalty.PenaltyType.TempBan && + _penalty.Active && + _penalty.Expires > DateTime.UtcNow); // they have an active tempban tied to their GUID if (profileTempBan != null) diff --git a/SharedLibraryCore/Services/ClientService.cs b/SharedLibraryCore/Services/ClientService.cs index 6ff6699f..19a25ec1 100644 --- a/SharedLibraryCore/Services/ClientService.cs +++ b/SharedLibraryCore/Services/ClientService.cs @@ -384,7 +384,8 @@ namespace SharedLibraryCore.Services Level = client.Level, Password = client.Password, PasswordSalt = client.PasswordSalt, - NetworkId = client.NetworkId + NetworkId = client.NetworkId, + LastConnection = client.LastConnection }; #if DEBUG == true diff --git a/WebfrontCore/Controllers/HomeController.cs b/WebfrontCore/Controllers/HomeController.cs index c5b92349..58cf2468 100644 --- a/WebfrontCore/Controllers/HomeController.cs +++ b/WebfrontCore/Controllers/HomeController.cs @@ -1,11 +1,5 @@ -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Linq; -using System.Threading.Tasks; -using Microsoft.AspNetCore.Diagnostics; +using Microsoft.AspNetCore.Diagnostics; using Microsoft.AspNetCore.Mvc; -using SharedLibraryCore.Dtos; namespace WebfrontCore.Controllers { diff --git a/WebfrontCore/Views/Client/Profile/Index.cshtml b/WebfrontCore/Views/Client/Profile/Index.cshtml index 028aae78..a23e83ac 100644 --- a/WebfrontCore/Views/Client/Profile/Index.cshtml +++ b/WebfrontCore/Views/Client/Profile/Index.cshtml @@ -6,88 +6,100 @@ string gravatarUrl = Model.Meta.FirstOrDefault(m => m.Key == "GravatarEmail")?.Value; bool isTempBanned = Model.ActivePenaltyType == "TempBan"; } -