- 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:
Dawid Bepierszcz
2024-02-21 13:14:46 +01:00
parent 619bdfbb14
commit 5bf966f9cd
16 changed files with 213 additions and 88 deletions

View File

@@ -76,6 +76,8 @@ namespace CS2_SimpleAdmin
IpAddress = caller?.IpAddress?.Split(":")[0]
};
Helper.LogCommand(caller, $"css_gag {player?.SteamID} {time} {reason}");
Task.Run(async () =>
{
await muteManager.MutePlayer(playerInfo, adminInfo, reason, time);
@@ -179,6 +181,8 @@ namespace CS2_SimpleAdmin
IpAddress = caller?.IpAddress?.Split(":")[0]
};
Helper.LogCommand(caller, command);
List<CCSPlayerController> matches = Helper.GetPlayerFromSteamid64(steamid);
if (matches.Count == 1)
{
@@ -264,6 +268,8 @@ namespace CS2_SimpleAdmin
_discordWebhookClientLog.SendMessageAsync(Helper.GenerateMessageDiscord(_localizer["sa_discord_log_command", $"[{callerName}]({communityUrl})", command.GetCommandString]));
}
Helper.LogCommand(caller, command);
bool found = false;
string pattern = command.GetArg(1);
@@ -405,6 +411,8 @@ namespace CS2_SimpleAdmin
IpAddress = caller?.IpAddress?.Split(":")[0]
};
Helper.LogCommand(caller, $"css_mute {player?.SteamID} {time} {reason}");
player!.VoiceFlags = VoiceFlags.Muted;
Task.Run(async () =>
@@ -483,6 +491,8 @@ namespace CS2_SimpleAdmin
_discordWebhookClientLog.SendMessageAsync(Helper.GenerateMessageDiscord(_localizer["sa_discord_log_command", $"[{callerName}]({communityUrl})", command.GetCommandString]));
}
Helper.LogCommand(caller, command);
int time = 0;
string reason = "Unknown";
@@ -581,6 +591,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);
bool found = false;
MuteManager _muteManager = new(_database);
@@ -711,6 +723,8 @@ namespace CS2_SimpleAdmin
IpAddress = caller?.IpAddress?.Split(":")[0]
};
Helper.LogCommand(caller, $"css_silence {player?.SteamID} {time} {reason}");
Task.Run(async () =>
{
await muteManager.MutePlayer(playerInfo, adminInfo, reason, time, 2);
@@ -797,6 +811,8 @@ namespace CS2_SimpleAdmin
_discordWebhookClientLog.SendMessageAsync(Helper.GenerateMessageDiscord(_localizer["sa_discord_log_command", $"[{callerName}]({communityUrl})", command.GetCommandString]));
}
Helper.LogCommand(caller, command);
int time = 0;
string reason = "Unknown";
@@ -898,6 +914,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);
bool found = false;
MuteManager _muteManager = new(_database);