mirror of
https://github.com/daffyyyy/CS2-SimpleAdmin.git
synced 2026-10-18 12:57:04 +02:00
Compare commits
2 commits
build-1.9.
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
03a454b1b5 | ||
|
|
c7395e5061 |
4 changed files with 7 additions and 4 deletions
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -442,7 +442,10 @@ internal class CacheManager: IDisposable
|
|||
/// </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.
|
||||
|
|
|
|||
|
|
@ -159,7 +159,7 @@ internal class MuteManager(IDatabaseProvider? databaseProvider)
|
|||
{
|
||||
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,
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
1.9.0
|
||||
1.9.1
|
||||
Loading…
Add table
Add a link
Reference in a new issue