mirror of
https://github.com/daffyyyy/CS2-SimpleAdmin.git
synced 2026-02-19 10:58:20 +00:00
1.4.9a
- Plugin save all players ips to database, when player banned then all used ips are banned too (for ban evading) - Minor changes
This commit is contained in:
15
Events.cs
15
Events.cs
@@ -182,6 +182,21 @@ public partial class CS2_SimpleAdmin
|
||||
BanManager banManager = new(_database, Config);
|
||||
MuteManager muteManager = new(_database);
|
||||
|
||||
try
|
||||
{
|
||||
await using var connection = await _database.GetConnectionAsync();
|
||||
|
||||
const string query = @"INSERT IGNORE INTO `sa_players_ips` (steamid, address)
|
||||
VALUES (@SteamID, @IPAddress)";
|
||||
|
||||
await connection.ExecuteAsync(query, new
|
||||
{
|
||||
SteamID = playerInfo.SteamId,
|
||||
IPAddress = playerInfo.IpAddress,
|
||||
});
|
||||
}
|
||||
catch { }
|
||||
|
||||
try
|
||||
{
|
||||
// Check if the player is banned
|
||||
|
||||
Reference in New Issue
Block a user