Compare commits

..

No commits in common. "main" and "build-1.9.0" have entirely different histories.

4 changed files with 4 additions and 7 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 ModuleName => "CS2-SimpleAdmin" + (Helper.IsDebugBuild ? " (DEBUG)" : " (RELEASE)");
public override string ModuleDescription => "Simple admin plugin for Counter-Strike 2 :)"; public override string ModuleDescription => "Simple admin plugin for Counter-Strike 2 :)";
public override string ModuleAuthor => "daffyy"; public override string ModuleAuthor => "daffyy";
public override string ModuleVersion => "1.9.1"; public override string ModuleVersion => "1.9.0";
public override void Load(bool hotReload) public override void Load(bool hotReload)
{ {

View file

@ -442,10 +442,7 @@ internal class CacheManager: IDisposable
/// </summary> /// </summary>
/// <param name="steamId">64-bit Steam ID of the player.</param> /// <param name="steamId">64-bit Steam ID of the player.</param>
/// <returns>List of <see cref="BanRecord"/> objects associated with the Steam ID.</returns> /// <returns>List of <see cref="BanRecord"/> objects associated with the Steam ID.</returns>
// _steamIdIndex holds only ACTIVE bans, so scan the full cache for history (expired/unbanned included). public List<BanRecord> GetPlayerBansBySteamId(ulong steamId) => _steamIdIndex.TryGetValue(steamId, out var bans) ? bans : [];
// ponytail: O(n) over all cached bans per call; add an all-status index if this gets hot.
public List<BanRecord> GetPlayerBansBySteamId(ulong steamId) =>
_banCache.Values.Where(b => b.PlayerSteamId == steamId).ToList();
/// <summary> /// <summary>
/// Gets all known Steam accounts that have used the specified IP address. /// Gets all known Steam accounts that have used the specified IP address.

View file

@ -159,7 +159,7 @@ internal class MuteManager(IDatabaseProvider? databaseProvider)
{ {
await using var connection = await databaseProvider.CreateConnectionAsync(); await using var connection = await databaseProvider.CreateConnectionAsync();
var sql = databaseProvider.GetMuteStatsQuery(CS2_SimpleAdmin.Instance.Config.MultiServerMode); var sql = databaseProvider.GetRetrieveMutesQuery(CS2_SimpleAdmin.Instance.Config.MultiServerMode);
var result = await connection.QuerySingleAsync<(int TotalMutes, int TotalGags, int TotalSilences)>(sql, new var result = await connection.QuerySingleAsync<(int TotalMutes, int TotalGags, int TotalSilences)>(sql, new
{ {
PlayerSteamID = playerInfo.SteamId.SteamId64, PlayerSteamID = playerInfo.SteamId.SteamId64,

View file

@ -1 +1 @@
1.9.1 1.9.0