Compare commits

..

1 commit

Author SHA1 Message Date
Dawid Bepierszcz
cf284bd121 Bump version and adjust SteamID type handling 2026-06-28 00:49:54 +02:00
4 changed files with 12 additions and 6 deletions

View file

@ -22,7 +22,7 @@ public partial class CS2_SimpleAdmin : BasePlugin, IPluginConfig<CS2_SimpleAdmin
public override string ModuleName => "CS2-SimpleAdmin" + (Helper.IsDebugBuild ? " (DEBUG)" : " (RELEASE)");
public override string ModuleDescription => "Simple admin plugin for Counter-Strike 2 :)";
public override string ModuleAuthor => "daffyy";
public override string ModuleVersion => "1.8.2a";
public override string ModuleVersion => "1.8.2b";
public override void Load(bool hotReload)
{

View file

@ -84,14 +84,14 @@ internal class CacheManager: IDisposable
foreach (var record in ipHistory)
{
// When we encounter a new steamid, save the previous one
if (record.Steamid != currentSteamId && currentSteamId != 0)
if ((ulong)record.Steamid != currentSteamId && currentSteamId != 0)
{
_playerIpsCache[currentSteamId] = currentIpSet;
currentIpSet = new HashSet<IpRecord>(new IpRecordComparer());
latestIpTimestamps.Clear();
}
currentSteamId = record.Steamid;
currentSteamId = (ulong)record.Steamid;
// Only keep the latest timestamp for each IP
if (!latestIpTimestamps.TryGetValue(record.Address, out var existingTimestamp) ||
@ -307,7 +307,7 @@ internal class CacheManager: IDisposable
);
_playerIpsCache.AddOrUpdate(
group.Key,
(ulong)group.Key,
_ => ipSet,
(_, existingSet) =>
{

View file

@ -1,3 +1,9 @@
namespace CS2_SimpleAdmin.Models;
public record IpHistoryRow(ulong Steamid, string? Name, uint Address, DateTime Used_at);
public record IpHistoryRow
{
public long Steamid { get; init; }
public string? Name { get; init; }
public uint Address { get; init; }
public DateTime Used_at { get; init; }
}

View file

@ -1 +1 @@
1.8.2a
1.8.2b