diff --git a/SharedLibraryCore/PartialEntities/EFClient.cs b/SharedLibraryCore/PartialEntities/EFClient.cs index 2fd5d8dd5..4351f1ba9 100644 --- a/SharedLibraryCore/PartialEntities/EFClient.cs +++ b/SharedLibraryCore/PartialEntities/EFClient.cs @@ -457,7 +457,8 @@ namespace SharedLibraryCore.Database.Models using (LogContext.PushProperty("Server", CurrentServer?.ToString())) { - if (string.IsNullOrWhiteSpace(Name) || CleanedName.Replace(" ", "").Length < + var nameToCheck = CurrentServer.IsCodGame() ? CleanedName : Name; + if (string.IsNullOrWhiteSpace(Name) || nameToCheck.Replace(" ", "").Length < (CurrentServer?.Manager?.GetApplicationSettings()?.Configuration()?.MinimumNameLength ?? 3)) { Utilities.DefaultLogger.LogInformation("Kicking {Client} because their name is too short", ToString()); diff --git a/SharedLibraryCore/Utilities.cs b/SharedLibraryCore/Utilities.cs index a56376ea3..a5066776b 100644 --- a/SharedLibraryCore/Utilities.cs +++ b/SharedLibraryCore/Utilities.cs @@ -186,6 +186,8 @@ namespace SharedLibraryCore /// public static bool IsZombieServer(this Server server) => server.GameName == Game.T6 && _zmGameTypes.Contains(server.Gametype.ToLower()); + public static bool IsCodGame(this Server server) => server.RconParser?.RConEngine == "COD"; + /// /// Get the IW Engine color code corresponding to an admin level ///