Skip to content

Commit

Permalink
Remove from list if they are not in the game
Browse files Browse the repository at this point in the history
  • Loading branch information
PintTheDragon committed Oct 20, 2020
1 parent 69eecce commit 300c82b
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions SCPStats/EventHandler.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.Http;
using System.Security.Cryptography;
using System.Text;
Expand Down Expand Up @@ -83,6 +84,14 @@ internal static void OnRoundStart()
};

SendRequest(data, "https://scpstats.com/plugin/event/roundstart");

foreach (var player in Players)
{
if (Player.List.All(p => HandleId(p.RawUserId) != player))
{
Players.Remove(player);
}
}
}

internal static void OnRoundEnd(RoundEndedEventArgs ev)
Expand Down

0 comments on commit 300c82b

Please sign in to comment.