From cc34c3365222673ed83a923fe7cb1864aa738bb1 Mon Sep 17 00:00:00 2001 From: AtomicLiquid Date: Fri, 22 Sep 2023 14:27:54 +0200 Subject: [PATCH] Fixed converting login to accountId. --- src/Modules/SponsorsModule/Controllers/SponsorsController.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Modules/SponsorsModule/Controllers/SponsorsController.cs b/src/Modules/SponsorsModule/Controllers/SponsorsController.cs index 1fffc49c9..f6fb815a4 100644 --- a/src/Modules/SponsorsModule/Controllers/SponsorsController.cs +++ b/src/Modules/SponsorsModule/Controllers/SponsorsController.cs @@ -5,6 +5,7 @@ using EvoSC.Common.Interfaces.Models.Enums; using EvoSC.Common.Interfaces.Services; using EvoSC.Common.Remote; +using EvoSC.Common.Util; using EvoSC.Modules.Official.SponsorsModule.Interfaces; using GbxRemoteNet.Events; @@ -25,7 +26,7 @@ public SponsorsController(ISponsorsService sponsorsService, IPlayerManagerServic [Subscribe(GbxRemoteEvent.PlayerConnect)] public async Task OnPlayerJoin(object sender, PlayerConnectGbxEventArgs playerConnectArgs) { - var player = await _playerManager.GetOnlinePlayerAsync(playerConnectArgs.Login); + var player = await _playerManager.GetOnlinePlayerAsync(PlayerUtils.ConvertLoginToAccountId(playerConnectArgs.Login)); if (player.State == PlayerState.Spectating) { await _sponsorsService.ShowWidget(playerConnectArgs.Login);