- 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

@@ -27,6 +27,8 @@ namespace CS2_SimpleAdmin
_discordWebhookClientLog.SendMessageAsync(Helper.GenerateMessageDiscord(_localizer["sa_discord_log_command", $"[{callerName}]({communityUrl})", command.GetCommandString]));
}
Helper.LogCommand(caller, command);
byte[] utf8BytesString = Encoding.UTF8.GetBytes(command.GetCommandString[command.GetCommandString.IndexOf(' ')..]);
string utf8String = Encoding.UTF8.GetString(utf8BytesString);
@@ -58,6 +60,8 @@ namespace CS2_SimpleAdmin
_discordWebhookClientLog.SendMessageAsync(Helper.GenerateMessageDiscord(_localizer["sa_discord_log_command", $"[{callerName}]({communityUrl})", command.GetCommandString]));
}
Helper.LogCommand(caller, command);
foreach (CCSPlayerController _player in Helper.GetValidPlayers())
{
using (new WithTemporaryCulture(_player.GetLanguage()))
@@ -78,6 +82,8 @@ namespace CS2_SimpleAdmin
if (targets == null) return;
List<CCSPlayerController> playersToTarget = targets!.Players.Where(player => player != null && player.IsValid && player.SteamID.ToString().Length == 17 && !player.IsHLTV).ToList();
Helper.LogCommand(caller, command);
int range = command.GetArg(0).Length + command.GetArg(1).Length + 2;
string message = command.GetCommandString[range..];
@@ -107,6 +113,8 @@ namespace CS2_SimpleAdmin
_discordWebhookClientLog.SendMessageAsync(Helper.GenerateMessageDiscord(_localizer["sa_discord_log_command", $"[{callerName}]({communityUrl})", command.GetCommandString]));
}
Helper.LogCommand(caller, command);
Helper.PrintToCenterAll(Helper.ReplaceTags(utf8String));
}
@@ -125,6 +133,8 @@ namespace CS2_SimpleAdmin
_discordWebhookClientLog.SendMessageAsync(Helper.GenerateMessageDiscord(_localizer["sa_discord_log_command", $"[{callerName}]({communityUrl})", command.GetCommandString]));
}
Helper.LogCommand(caller, command);
VirtualFunctions.ClientPrintAll(
HudDestination.Alert,
Helper.ReplaceTags(utf8String),