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:
parent
6fc8b015ba
commit
3b98f19a7c
11 changed files with 162 additions and 118 deletions
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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue