Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CS2-SimpleAdmin/CS2-SimpleAdmin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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.9.0";
public override string ModuleVersion => "1.9.1";

public override void Load(bool hotReload)
{
Expand Down
5 changes: 4 additions & 1 deletion CS2-SimpleAdmin/Managers/CacheManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,10 @@ private void RebuildIndexesCore()
/// </summary>
/// <param name="steamId">64-bit Steam ID of the player.</param>
/// <returns>List of <see cref="BanRecord"/> objects associated with the Steam ID.</returns>
public List<BanRecord> GetPlayerBansBySteamId(ulong steamId) => _steamIdIndex.TryGetValue(steamId, out var bans) ? bans : [];
// _steamIdIndex holds only ACTIVE bans, so scan the full cache for history (expired/unbanned included).
// 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>
/// Gets all known Steam accounts that have used the specified IP address.
Expand Down
2 changes: 1 addition & 1 deletion CS2-SimpleAdmin/Managers/MuteManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ public async Task<List<dynamic>> IsPlayerMuted(string steamId)
{
await using var connection = await databaseProvider.CreateConnectionAsync();

var sql = databaseProvider.GetRetrieveMutesQuery(CS2_SimpleAdmin.Instance.Config.MultiServerMode);
var sql = databaseProvider.GetMuteStatsQuery(CS2_SimpleAdmin.Instance.Config.MultiServerMode);
var result = await connection.QuerySingleAsync<(int TotalMutes, int TotalGags, int TotalSilences)>(sql, new
{
PlayerSteamID = playerInfo.SteamId.SteamId64,
Expand Down
2 changes: 1 addition & 1 deletion CS2-SimpleAdmin/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.9.0
1.9.1
Loading