mirror of
https://github.com/daffyyyy/CS2-SimpleAdmin.git
synced 2026-02-19 19:00:03 +00:00
1.3.3a
- Fixed godmode - Added logging commands to simpleadmin logs file - Fixed votes? - Added updating player_ip and player_name after connect with ban issued by css_addban
This commit is contained in:
@@ -58,6 +58,7 @@ namespace CS2_SimpleAdmin
|
||||
internal void Ban(CCSPlayerController? caller, CCSPlayerController player, int time, string reason, string? callerName = null, BanManager? banManager = null)
|
||||
{
|
||||
if (_database == null) return;
|
||||
|
||||
callerName ??= caller == null ? "Console" : caller.PlayerName;
|
||||
banManager ??= new BanManager(_database, Config);
|
||||
|
||||
@@ -80,6 +81,8 @@ namespace CS2_SimpleAdmin
|
||||
IpAddress = caller?.IpAddress?.Split(":")[0]
|
||||
};
|
||||
|
||||
Helper.LogCommand(caller, $"css_ban {player?.SteamID} {time} {reason}");
|
||||
|
||||
Task.Run(async () =>
|
||||
{
|
||||
await banManager.BanPlayer(playerInfo, adminInfo, reason, time);
|
||||
@@ -177,6 +180,8 @@ namespace CS2_SimpleAdmin
|
||||
IpAddress = caller?.IpAddress?.Split(":")[0]
|
||||
};
|
||||
|
||||
Helper.LogCommand(caller, command);
|
||||
|
||||
List<CCSPlayerController> matches = Helper.GetPlayerFromSteamid64(steamid);
|
||||
if (matches.Count == 1)
|
||||
{
|
||||
@@ -281,6 +286,8 @@ namespace CS2_SimpleAdmin
|
||||
IpAddress = caller?.IpAddress?.Split(":")[0]
|
||||
};
|
||||
|
||||
Helper.LogCommand(caller, command);
|
||||
|
||||
int.TryParse(command.GetArg(2), out int time);
|
||||
|
||||
if (command.ArgCount >= 3 && command.GetArg(3).Length > 0)
|
||||
@@ -375,6 +382,8 @@ namespace CS2_SimpleAdmin
|
||||
_discordWebhookClientLog.SendMessageAsync(Helper.GenerateMessageDiscord(_localizer["sa_discord_log_command", $"[{callerName}]({communityUrl})", command.GetCommandString]));
|
||||
}
|
||||
|
||||
Helper.LogCommand(caller, command);
|
||||
|
||||
string pattern = command.GetArg(1);
|
||||
|
||||
Database database = new Database(dbConnectionString);
|
||||
|
||||
Reference in New Issue
Block a user