diff --git a/Application/IW4MServer.cs b/Application/IW4MServer.cs index 5db76cd04..c4b00d0fa 100644 --- a/Application/IW4MServer.cs +++ b/Application/IW4MServer.cs @@ -373,9 +373,9 @@ namespace IW4MAdmin var clientTag = await _metaService.GetPersistentMetaByLookup(EFMeta.ClientTagV2, EFMeta.ClientTagNameV2, E.Origin.ClientId, Manager.CancellationToken); - if (clientTag?.LinkedMeta != null) + if (clientTag.Value != null) { - E.Origin.Tag = clientTag.LinkedMeta.Value; + E.Origin.Tag = clientTag.Value; } try diff --git a/Plugins/Welcome/Plugin.cs b/Plugins/Welcome/Plugin.cs index 15a353adf..35323940a 100644 --- a/Plugins/Welcome/Plugin.cs +++ b/Plugins/Welcome/Plugin.cs @@ -53,7 +53,7 @@ namespace IW4MAdmin.Plugins.Welcome { var newPlayer = gameEvent.Origin; if (newPlayer.Level >= Permission.Trusted && !gameEvent.Origin.Masked|| - !string.IsNullOrEmpty(newPlayer.GetAdditionalProperty("ClientTag")) && + !string.IsNullOrEmpty(newPlayer.Tag) && newPlayer.Level != Permission.Flagged && newPlayer.Level != Permission.Banned && !newPlayer.Masked) gameEvent.Owner.Broadcast( @@ -88,7 +88,7 @@ namespace IW4MAdmin.Plugins.Welcome { msg = msg.Replace("{{ClientName}}", joining.Name); msg = msg.Replace("{{ClientLevel}}", - $"{Utilities.ConvertLevelToColor(joining.Level, joining.ClientPermission.Name)}{(string.IsNullOrEmpty(joining.GetAdditionalProperty("ClientTag")) ? "" : $" (Color::White)({joining.GetAdditionalProperty("ClientTag")}(Color::White))")}"); + $"{Utilities.ConvertLevelToColor(joining.Level, joining.ClientPermission.Name)}{(string.IsNullOrEmpty(joining.Tag) ? "" : $" (Color::White){joining.Tag}(Color::White)")}"); // this prevents it from trying to evaluate it every message if (msg.Contains("{{ClientLocation}}")) { @@ -111,7 +111,7 @@ namespace IW4MAdmin.Plugins.Welcome try { var response = - await wc.GetStringAsync(new Uri($"http://ip-api.com/json/{ip}")); + await wc.GetStringAsync(new Uri($"http://ip-api.com/json/{ip}?lang={Utilities.CurrentLocalization.LocalizationName.Split("-").First().ToLower()}")); var responseObj = JObject.Parse(response); response = responseObj["country"]?.ToString();