- Fixed kick reason
- Small changes
- Fixed map name in css_map command
This commit is contained in:
Dawid Bepierszcz
2024-03-11 01:16:34 +01:00
parent 525905194c
commit cce265c6b7
3 changed files with 50 additions and 59 deletions

View File

@@ -413,7 +413,7 @@ namespace CS2_SimpleAdmin
player.Pawn.Value!.Freeze();
}
reason = CS2_SimpleAdmin._localizer?["sa_unknown"] ?? "Unknown";
reason = reason ?? CS2_SimpleAdmin._localizer?["sa_unknown"] ?? "Unknown";
Helper.LogCommand(caller, $"css_kick {player.PlayerName} {reason}");
@@ -462,6 +462,8 @@ namespace CS2_SimpleAdmin
string callerName = caller == null ? "Console" : caller.PlayerName;
string _command = string.Empty;
map = map.ToLower();
if (map.StartsWith("ws:"))
{
if (long.TryParse(map.Replace("ws:", ""), out long mapId))
@@ -540,6 +542,8 @@ namespace CS2_SimpleAdmin
string callerName = caller == null ? "Console" : caller.PlayerName;
string _command = string.Empty;
map = map.ToLower();
if (long.TryParse(map, out long mapId))
{
_command = $"host_workshop_map {mapId}";