mirror of
https://github.com/daffyyyy/CS2-SimpleAdmin.git
synced 2026-10-18 04:47:04 +02:00
1.2.6e
- Finally? fixed sqladmins
This commit is contained in:
parent
48baac0a7b
commit
2d41a62b52
4 changed files with 45 additions and 20 deletions
|
|
@ -1,5 +1,4 @@
|
|||
using CounterStrikeSharp.API.Modules.Admin;
|
||||
using CounterStrikeSharp.API.Modules.Entities;
|
||||
using CounterStrikeSharp.API.Modules.Entities;
|
||||
using Dapper;
|
||||
using MySqlConnector;
|
||||
|
||||
|
|
@ -250,18 +249,6 @@ namespace CS2_SimpleAdmin
|
|||
|
||||
string sql = "DELETE FROM sa_admins WHERE player_steamid = @PlayerSteamID";
|
||||
await connection.ExecuteAsync(sql, new { PlayerSteamID = playerSteamId });
|
||||
|
||||
if (!string.IsNullOrEmpty(playerSteamId) && SteamID.TryParse(playerSteamId, out var steamId) && steamId != null)
|
||||
{
|
||||
if (_adminCacheSet.Contains(steamId))
|
||||
{
|
||||
_adminCacheSet.Remove(steamId);
|
||||
_adminCacheTimestamps.Remove(steamId);
|
||||
}
|
||||
|
||||
AdminManager.ClearPlayerPermissions(steamId);
|
||||
AdminManager.RemovePlayerAdminData(steamId);
|
||||
}
|
||||
}
|
||||
|
||||
public async Task AddAdminBySteamId(string playerSteamId, string playerName, string flags, int immunity = 0, int time = 0)
|
||||
|
|
@ -293,8 +280,6 @@ namespace CS2_SimpleAdmin
|
|||
created = now,
|
||||
serverid = CS2_SimpleAdmin.ServerId
|
||||
});
|
||||
|
||||
_ = GiveAllFlags();
|
||||
}
|
||||
|
||||
public async Task DeleteOldAdmins()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue