Skip to content

Commit

Permalink
Fixed converting login to accountId.
Browse files Browse the repository at this point in the history
  • Loading branch information
AtomicLiquid committed Sep 22, 2023
1 parent aaa0a50 commit cc34c33
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Modules/SponsorsModule/Controllers/SponsorsController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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);
Expand Down

0 comments on commit cc34c33

Please sign in to comment.