mirror of
https://github.com/daffyyyy/CS2-SimpleAdmin.git
synced 2026-02-25 12:52:18 +00:00
Added translation
- Minor changes - Version bump - Added translation
This commit is contained in:
@@ -38,7 +38,7 @@ public partial class CS2_SimpleAdmin : BasePlugin, IPluginConfig<CS2_SimpleAdmin
|
|||||||
public override string ModuleName => "CS2-SimpleAdmin";
|
public override string ModuleName => "CS2-SimpleAdmin";
|
||||||
public override string ModuleDescription => "Simple admin plugin for Counter-Strike 2 :)";
|
public override string ModuleDescription => "Simple admin plugin for Counter-Strike 2 :)";
|
||||||
public override string ModuleAuthor => "daffyy & Dliix66";
|
public override string ModuleAuthor => "daffyy & Dliix66";
|
||||||
public override string ModuleVersion => "1.3.7a";
|
public override string ModuleVersion => "1.3.8a";
|
||||||
|
|
||||||
public CS2_SimpleAdminConfig Config { get; set; } = new();
|
public CS2_SimpleAdminConfig Config { get; set; } = new();
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ using CounterStrikeSharp.API.Core.Translations;
|
|||||||
using CounterStrikeSharp.API.Modules.Admin;
|
using CounterStrikeSharp.API.Modules.Admin;
|
||||||
using CounterStrikeSharp.API.Modules.Commands;
|
using CounterStrikeSharp.API.Modules.Commands;
|
||||||
using CounterStrikeSharp.API.Modules.Commands.Targeting;
|
using CounterStrikeSharp.API.Modules.Commands.Targeting;
|
||||||
using CounterStrikeSharp.API.Modules.Entities;
|
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
|
||||||
namespace CS2_SimpleAdmin
|
namespace CS2_SimpleAdmin
|
||||||
@@ -20,7 +19,7 @@ namespace CS2_SimpleAdmin
|
|||||||
if (command.ArgCount < 2)
|
if (command.ArgCount < 2)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
string reason = CS2_SimpleAdmin._localizer?["sa_unknown"] ?? "Unknown";
|
string reason = _localizer?["sa_unknown"] ?? "Unknown";
|
||||||
|
|
||||||
TargetResult? targets = GetTarget(command);
|
TargetResult? targets = GetTarget(command);
|
||||||
if (targets == null) return;
|
if (targets == null) return;
|
||||||
@@ -31,10 +30,7 @@ namespace CS2_SimpleAdmin
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Helper.SendDiscordLogMessage(caller, command, _discordWebhookClientLog, _localizer);
|
Database database = new(dbConnectionString);
|
||||||
|
|
||||||
Database database = new Database(dbConnectionString);
|
|
||||||
|
|
||||||
BanManager _banManager = new(database, Config);
|
BanManager _banManager = new(database, Config);
|
||||||
|
|
||||||
int.TryParse(command.GetArg(2), out int time);
|
int.TryParse(command.GetArg(2), out int time);
|
||||||
@@ -46,12 +42,12 @@ namespace CS2_SimpleAdmin
|
|||||||
{
|
{
|
||||||
if (caller!.CanTarget(player))
|
if (caller!.CanTarget(player))
|
||||||
{
|
{
|
||||||
Ban(caller, player, time, reason, callerName, _banManager);
|
Ban(caller, player, time, reason, callerName, _banManager, command);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
internal void Ban(CCSPlayerController? caller, CCSPlayerController player, int time, string reason, string? callerName = null, BanManager? banManager = null)
|
internal void Ban(CCSPlayerController? caller, CCSPlayerController player, int time, string reason, string? callerName = null, BanManager? banManager = null, CommandInfo? command = null)
|
||||||
{
|
{
|
||||||
if (_database == null) return;
|
if (_database == null) return;
|
||||||
|
|
||||||
@@ -76,8 +72,6 @@ namespace CS2_SimpleAdmin
|
|||||||
IpAddress = caller?.IpAddress?.Split(":")[0]
|
IpAddress = caller?.IpAddress?.Split(":")[0]
|
||||||
};
|
};
|
||||||
|
|
||||||
Helper.LogCommand(caller, $"css_ban {player.SteamID} {time} {reason}");
|
|
||||||
|
|
||||||
Task.Run(async () =>
|
Task.Run(async () =>
|
||||||
{
|
{
|
||||||
banManager ??= new BanManager(_database, Config);
|
banManager ??= new BanManager(_database, Config);
|
||||||
@@ -133,6 +127,12 @@ namespace CS2_SimpleAdmin
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (command != null)
|
||||||
|
{
|
||||||
|
Helper.LogCommand(caller, command);
|
||||||
|
Helper.SendDiscordLogMessage(caller, command, _discordWebhookClientLog, _localizer);
|
||||||
|
}
|
||||||
Helper.SendDiscordPenaltyMessage(caller, player, reason, time, Helper.PenaltyType.Ban, _discordWebhookClientPenalty, _localizer);
|
Helper.SendDiscordPenaltyMessage(caller, player, reason, time, Helper.PenaltyType.Ban, _discordWebhookClientPenalty, _localizer);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -155,12 +155,9 @@ namespace CS2_SimpleAdmin
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Helper.SendDiscordLogMessage(caller, command, _discordWebhookClientLog, _localizer);
|
string reason = _localizer?["sa_unknown"] ?? "Unknown";
|
||||||
|
|
||||||
string reason = CS2_SimpleAdmin._localizer?["sa_unknown"] ?? "Unknown";
|
|
||||||
|
|
||||||
Database database = new Database(dbConnectionString);
|
|
||||||
|
|
||||||
|
Database database = new(dbConnectionString);
|
||||||
BanManager _banManager = new(database, Config);
|
BanManager _banManager = new(database, Config);
|
||||||
|
|
||||||
int.TryParse(command.GetArg(2), out int time);
|
int.TryParse(command.GetArg(2), out int time);
|
||||||
@@ -175,8 +172,6 @@ namespace CS2_SimpleAdmin
|
|||||||
IpAddress = caller?.IpAddress?.Split(":")[0]
|
IpAddress = caller?.IpAddress?.Split(":")[0]
|
||||||
};
|
};
|
||||||
|
|
||||||
Helper.LogCommand(caller, command);
|
|
||||||
|
|
||||||
List<CCSPlayerController> matches = Helper.GetPlayerFromSteamid64(steamid);
|
List<CCSPlayerController> matches = Helper.GetPlayerFromSteamid64(steamid);
|
||||||
if (matches.Count == 1)
|
if (matches.Count == 1)
|
||||||
{
|
{
|
||||||
@@ -235,6 +230,7 @@ namespace CS2_SimpleAdmin
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Helper.SendDiscordPenaltyMessage(caller, player, reason, time, Helper.PenaltyType.Ban, _discordWebhookClientPenalty, _localizer);
|
Helper.SendDiscordPenaltyMessage(caller, player, reason, time, Helper.PenaltyType.Ban, _discordWebhookClientPenalty, _localizer);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -244,7 +240,14 @@ namespace CS2_SimpleAdmin
|
|||||||
await _banManager.AddBanBySteamid(steamid, adminInfo, reason, time);
|
await _banManager.AddBanBySteamid(steamid, adminInfo, reason, time);
|
||||||
});
|
});
|
||||||
|
|
||||||
command.ReplyToCommand($"Banned player with steamid {steamid}.");
|
if (command != null)
|
||||||
|
{
|
||||||
|
Helper.LogCommand(caller, command);
|
||||||
|
Helper.SendDiscordLogMessage(caller, command, _discordWebhookClientLog, _localizer);
|
||||||
|
}
|
||||||
|
//Helper.SendDiscordPenaltyMessage(caller, player, reason, time, Helper.PenaltyType.Ban, _discordWebhookClientPenalty, _localizer);
|
||||||
|
|
||||||
|
command?.ReplyToCommand($"Banned player with steamid {steamid}.");
|
||||||
}
|
}
|
||||||
|
|
||||||
[ConsoleCommand("css_banip")]
|
[ConsoleCommand("css_banip")]
|
||||||
@@ -269,7 +272,7 @@ namespace CS2_SimpleAdmin
|
|||||||
|
|
||||||
Helper.SendDiscordLogMessage(caller, command, _discordWebhookClientLog, _localizer);
|
Helper.SendDiscordLogMessage(caller, command, _discordWebhookClientLog, _localizer);
|
||||||
|
|
||||||
string reason = CS2_SimpleAdmin._localizer?["sa_unknown"] ?? "Unknown";
|
string reason = _localizer?["sa_unknown"] ?? "Unknown";
|
||||||
|
|
||||||
PlayerInfo adminInfo = new PlayerInfo
|
PlayerInfo adminInfo = new PlayerInfo
|
||||||
{
|
{
|
||||||
@@ -278,8 +281,6 @@ namespace CS2_SimpleAdmin
|
|||||||
IpAddress = caller?.IpAddress?.Split(":")[0]
|
IpAddress = caller?.IpAddress?.Split(":")[0]
|
||||||
};
|
};
|
||||||
|
|
||||||
Helper.LogCommand(caller, command);
|
|
||||||
|
|
||||||
int.TryParse(command.GetArg(2), out int time);
|
int.TryParse(command.GetArg(2), out int time);
|
||||||
|
|
||||||
if (command.ArgCount >= 3 && command.GetArg(3).Length > 0)
|
if (command.ArgCount >= 3 && command.GetArg(3).Length > 0)
|
||||||
@@ -347,7 +348,6 @@ namespace CS2_SimpleAdmin
|
|||||||
{
|
{
|
||||||
Helper.KickPlayer(player.UserId.Value, "Banned");
|
Helper.KickPlayer(player.UserId.Value, "Banned");
|
||||||
}, CounterStrikeSharp.API.Modules.Timers.TimerFlags.STOP_ON_MAPCHANGE);
|
}, CounterStrikeSharp.API.Modules.Timers.TimerFlags.STOP_ON_MAPCHANGE);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Helper.SendDiscordPenaltyMessage(caller, player, reason, time, Helper.PenaltyType.Ban, _discordWebhookClientPenalty, _localizer);
|
Helper.SendDiscordPenaltyMessage(caller, player, reason, time, Helper.PenaltyType.Ban, _discordWebhookClientPenalty, _localizer);
|
||||||
@@ -359,7 +359,13 @@ namespace CS2_SimpleAdmin
|
|||||||
await _banManager.AddBanByIp(ipAddress, adminInfo, reason, time);
|
await _banManager.AddBanByIp(ipAddress, adminInfo, reason, time);
|
||||||
});
|
});
|
||||||
|
|
||||||
command.ReplyToCommand($"Banned player with IP address {ipAddress}.");
|
if (command != null)
|
||||||
|
{
|
||||||
|
Helper.LogCommand(caller, command);
|
||||||
|
Helper.SendDiscordLogMessage(caller, command, _discordWebhookClientLog, _localizer);
|
||||||
|
}
|
||||||
|
|
||||||
|
command?.ReplyToCommand($"Banned player with IP address {ipAddress}.");
|
||||||
}
|
}
|
||||||
|
|
||||||
[ConsoleCommand("css_unban")]
|
[ConsoleCommand("css_unban")]
|
||||||
@@ -376,15 +382,14 @@ namespace CS2_SimpleAdmin
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Helper.SendDiscordLogMessage(caller, command, _discordWebhookClientLog, _localizer);
|
|
||||||
|
|
||||||
Helper.LogCommand(caller, command);
|
|
||||||
|
|
||||||
string pattern = command.GetArg(1);
|
string pattern = command.GetArg(1);
|
||||||
|
|
||||||
BanManager _banManager = new BanManager(_database, Config);
|
BanManager _banManager = new(_database, Config);
|
||||||
Task.Run(async () => await _banManager.UnbanPlayer(pattern));
|
Task.Run(async () => await _banManager.UnbanPlayer(pattern));
|
||||||
|
|
||||||
|
Helper.SendDiscordLogMessage(caller, command, _discordWebhookClientLog, _localizer);
|
||||||
|
Helper.LogCommand(caller, command);
|
||||||
|
|
||||||
command.ReplyToCommand($"Unbanned player with pattern {pattern}.");
|
command.ReplyToCommand($"Unbanned player with pattern {pattern}.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ using CounterStrikeSharp.API.Core.Translations;
|
|||||||
using CounterStrikeSharp.API.Modules.Admin;
|
using CounterStrikeSharp.API.Modules.Admin;
|
||||||
using CounterStrikeSharp.API.Modules.Commands;
|
using CounterStrikeSharp.API.Modules.Commands;
|
||||||
using CounterStrikeSharp.API.Modules.Commands.Targeting;
|
using CounterStrikeSharp.API.Modules.Commands.Targeting;
|
||||||
using CounterStrikeSharp.API.Modules.Entities;
|
|
||||||
using CounterStrikeSharp.API.Modules.Memory;
|
using CounterStrikeSharp.API.Modules.Memory;
|
||||||
using CounterStrikeSharp.API.Modules.Utils;
|
using CounterStrikeSharp.API.Modules.Utils;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
@@ -22,7 +21,6 @@ namespace CS2_SimpleAdmin
|
|||||||
string callerName = caller == null ? "Console" : caller.PlayerName;
|
string callerName = caller == null ? "Console" : caller.PlayerName;
|
||||||
|
|
||||||
Helper.SendDiscordLogMessage(caller, command, _discordWebhookClientLog, _localizer);
|
Helper.SendDiscordLogMessage(caller, command, _discordWebhookClientLog, _localizer);
|
||||||
|
|
||||||
Helper.LogCommand(caller, command);
|
Helper.LogCommand(caller, command);
|
||||||
|
|
||||||
byte[] utf8BytesString = Encoding.UTF8.GetBytes(command.GetCommandString[command.GetCommandString.IndexOf(' ')..]);
|
byte[] utf8BytesString = Encoding.UTF8.GetBytes(command.GetCommandString[command.GetCommandString.IndexOf(' ')..]);
|
||||||
@@ -51,7 +49,6 @@ namespace CS2_SimpleAdmin
|
|||||||
string utf8String = Encoding.UTF8.GetString(utf8BytesString);
|
string utf8String = Encoding.UTF8.GetString(utf8BytesString);
|
||||||
|
|
||||||
Helper.SendDiscordLogMessage(caller, command, _discordWebhookClientLog, _localizer);
|
Helper.SendDiscordLogMessage(caller, command, _discordWebhookClientLog, _localizer);
|
||||||
|
|
||||||
Helper.LogCommand(caller, command);
|
Helper.LogCommand(caller, command);
|
||||||
|
|
||||||
foreach (CCSPlayerController _player in Helper.GetValidPlayers())
|
foreach (CCSPlayerController _player in Helper.GetValidPlayers())
|
||||||
@@ -76,7 +73,7 @@ namespace CS2_SimpleAdmin
|
|||||||
if (targets == null) return;
|
if (targets == null) return;
|
||||||
List<CCSPlayerController> playersToTarget = targets!.Players.Where(player => player != null && player.IsValid && player.SteamID.ToString().Length == 17 && !player.IsHLTV).ToList();
|
List<CCSPlayerController> playersToTarget = targets!.Players.Where(player => player != null && player.IsValid && player.SteamID.ToString().Length == 17 && !player.IsHLTV).ToList();
|
||||||
|
|
||||||
Helper.LogCommand(caller, command);
|
//Helper.LogCommand(caller, command);
|
||||||
|
|
||||||
int range = command.GetArg(0).Length + command.GetArg(1).Length + 2;
|
int range = command.GetArg(0).Length + command.GetArg(1).Length + 2;
|
||||||
string message = command.GetCommandString[range..];
|
string message = command.GetCommandString[range..];
|
||||||
@@ -102,7 +99,6 @@ namespace CS2_SimpleAdmin
|
|||||||
string utf8String = Encoding.UTF8.GetString(utf8BytesString);
|
string utf8String = Encoding.UTF8.GetString(utf8BytesString);
|
||||||
|
|
||||||
Helper.SendDiscordLogMessage(caller, command, _discordWebhookClientLog, _localizer);
|
Helper.SendDiscordLogMessage(caller, command, _discordWebhookClientLog, _localizer);
|
||||||
|
|
||||||
Helper.LogCommand(caller, command);
|
Helper.LogCommand(caller, command);
|
||||||
|
|
||||||
Helper.PrintToCenterAll(StringExtensions.ReplaceColorTags(utf8String));
|
Helper.PrintToCenterAll(StringExtensions.ReplaceColorTags(utf8String));
|
||||||
@@ -118,7 +114,6 @@ namespace CS2_SimpleAdmin
|
|||||||
string utf8String = Encoding.UTF8.GetString(utf8BytesString);
|
string utf8String = Encoding.UTF8.GetString(utf8BytesString);
|
||||||
|
|
||||||
Helper.SendDiscordLogMessage(caller, command, _discordWebhookClientLog, _localizer);
|
Helper.SendDiscordLogMessage(caller, command, _discordWebhookClientLog, _localizer);
|
||||||
|
|
||||||
Helper.LogCommand(caller, command);
|
Helper.LogCommand(caller, command);
|
||||||
|
|
||||||
VirtualFunctions.ClientPrintAll(
|
VirtualFunctions.ClientPrintAll(
|
||||||
|
|||||||
@@ -122,8 +122,6 @@ namespace CS2_SimpleAdmin
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Helper.SendDiscordLogMessage(caller, command, _discordWebhookClientLog, _localizer);
|
|
||||||
|
|
||||||
string steamid = command.GetArg(1);
|
string steamid = command.GetArg(1);
|
||||||
string name = command.GetArg(2);
|
string name = command.GetArg(2);
|
||||||
string flags = command.GetArg(3);
|
string flags = command.GetArg(3);
|
||||||
@@ -133,7 +131,7 @@ namespace CS2_SimpleAdmin
|
|||||||
int time = 0;
|
int time = 0;
|
||||||
int.TryParse(command.GetArg(5), out time);
|
int.TryParse(command.GetArg(5), out time);
|
||||||
|
|
||||||
AddAdmin(caller, steamid, name, flags, immunity, time, globalAdmin);
|
AddAdmin(caller, steamid, name, flags, immunity, time, globalAdmin, command);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void AddAdmin(CCSPlayerController? caller, string steamid, string name, string flags, int immunity, int time = 0, bool globalAdmin = false, CommandInfo? command = null)
|
public void AddAdmin(CCSPlayerController? caller, string steamid, string name, string flags, int immunity, int time = 0, bool globalAdmin = false, CommandInfo? command = null)
|
||||||
@@ -142,6 +140,8 @@ namespace CS2_SimpleAdmin
|
|||||||
AdminSQLManager _adminManager = new(_database);
|
AdminSQLManager _adminManager = new(_database);
|
||||||
_ = _adminManager.AddAdminBySteamId(steamid, name, flags, immunity, time, globalAdmin);
|
_ = _adminManager.AddAdminBySteamId(steamid, name, flags, immunity, time, globalAdmin);
|
||||||
|
|
||||||
|
if (command != null)
|
||||||
|
Helper.SendDiscordLogMessage(caller, command, _discordWebhookClientLog, _localizer);
|
||||||
Helper.LogCommand(caller, $"css_addadmin {steamid} {name} {flags} {immunity} {time}");
|
Helper.LogCommand(caller, $"css_addadmin {steamid} {name} {flags} {immunity} {time}");
|
||||||
|
|
||||||
string msg = $"Added '{flags}' flags to '{name}' ({steamid})";
|
string msg = $"Added '{flags}' flags to '{name}' ({steamid})";
|
||||||
@@ -167,12 +167,10 @@ namespace CS2_SimpleAdmin
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Helper.SendDiscordLogMessage(caller, command, _discordWebhookClientLog, _localizer);
|
|
||||||
|
|
||||||
string steamid = command.GetArg(1);
|
string steamid = command.GetArg(1);
|
||||||
bool globalDelete = command.GetArg(2).ToLower().Equals("-g");
|
bool globalDelete = command.GetArg(2).ToLower().Equals("-g");
|
||||||
|
|
||||||
RemoveAdmin(caller, steamid, globalDelete);
|
RemoveAdmin(caller, steamid, globalDelete, command);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void RemoveAdmin(CCSPlayerController? caller, string steamid, bool globalDelete = false, CommandInfo? command = null)
|
public void RemoveAdmin(CCSPlayerController? caller, string steamid, bool globalDelete = false, CommandInfo? command = null)
|
||||||
@@ -195,6 +193,8 @@ namespace CS2_SimpleAdmin
|
|||||||
}
|
}
|
||||||
}, CounterStrikeSharp.API.Modules.Timers.TimerFlags.STOP_ON_MAPCHANGE);
|
}, CounterStrikeSharp.API.Modules.Timers.TimerFlags.STOP_ON_MAPCHANGE);
|
||||||
|
|
||||||
|
if (command != null)
|
||||||
|
Helper.SendDiscordLogMessage(caller, command, _discordWebhookClientLog, _localizer);
|
||||||
Helper.LogCommand(caller, $"css_deladmin {steamid}");
|
Helper.LogCommand(caller, $"css_deladmin {steamid}");
|
||||||
|
|
||||||
string msg = $"Removed flags from '{steamid}'";
|
string msg = $"Removed flags from '{steamid}'";
|
||||||
@@ -277,7 +277,8 @@ namespace CS2_SimpleAdmin
|
|||||||
TargetResult? targets = GetTarget(command);
|
TargetResult? targets = GetTarget(command);
|
||||||
if (targets == null) return;
|
if (targets == null) return;
|
||||||
|
|
||||||
Helper.SendDiscordLogMessage(caller, command, _discordWebhookClientLog, _localizer);
|
Helper.LogCommand(caller, command);
|
||||||
|
//Helper.SendDiscordLogMessage(caller, command, _discordWebhookClientLog, _localizer);
|
||||||
|
|
||||||
List<CCSPlayerController> playersToTarget = targets!.Players.Where(player => player != null && player.IsValid && player.SteamID.ToString().Length == 17 && !player.IsHLTV).ToList();
|
List<CCSPlayerController> playersToTarget = targets!.Players.Where(player => player != null && player.IsValid && player.SteamID.ToString().Length == 17 && !player.IsHLTV).ToList();
|
||||||
|
|
||||||
@@ -371,7 +372,7 @@ namespace CS2_SimpleAdmin
|
|||||||
public void OnKickCommand(CCSPlayerController? caller, CommandInfo command)
|
public void OnKickCommand(CCSPlayerController? caller, CommandInfo command)
|
||||||
{
|
{
|
||||||
string callerName = caller == null ? "Console" : caller.PlayerName;
|
string callerName = caller == null ? "Console" : caller.PlayerName;
|
||||||
string reason = CS2_SimpleAdmin._localizer?["sa_unknown"] ?? "Unknown";
|
string reason = _localizer?["sa_unknown"] ?? "Unknown";
|
||||||
|
|
||||||
TargetResult? targets = GetTarget(command);
|
TargetResult? targets = GetTarget(command);
|
||||||
|
|
||||||
@@ -385,8 +386,6 @@ namespace CS2_SimpleAdmin
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Helper.SendDiscordLogMessage(caller, command, _discordWebhookClientLog, _localizer);
|
|
||||||
|
|
||||||
if (command.ArgCount >= 2 && command.GetArg(2).Length > 0)
|
if (command.ArgCount >= 2 && command.GetArg(2).Length > 0)
|
||||||
reason = command.GetArg(2);
|
reason = command.GetArg(2);
|
||||||
|
|
||||||
@@ -397,12 +396,12 @@ namespace CS2_SimpleAdmin
|
|||||||
|
|
||||||
if (caller!.CanTarget(player))
|
if (caller!.CanTarget(player))
|
||||||
{
|
{
|
||||||
Kick(caller, player, reason, callerName);
|
Kick(caller, player, reason, callerName, command);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Kick(CCSPlayerController? caller, CCSPlayerController player, string reason = "Unknown", string? callerName = null)
|
public void Kick(CCSPlayerController? caller, CCSPlayerController player, string reason = "Unknown", string? callerName = null, CommandInfo? command = null)
|
||||||
{
|
{
|
||||||
callerName ??= caller == null ? "Console" : caller.PlayerName;
|
callerName ??= caller == null ? "Console" : caller.PlayerName;
|
||||||
if (player.PawnIsAlive)
|
if (player.PawnIsAlive)
|
||||||
@@ -410,8 +409,10 @@ namespace CS2_SimpleAdmin
|
|||||||
player.Pawn.Value!.Freeze();
|
player.Pawn.Value!.Freeze();
|
||||||
}
|
}
|
||||||
|
|
||||||
reason = reason ?? CS2_SimpleAdmin._localizer?["sa_unknown"] ?? "Unknown";
|
reason = reason ?? _localizer?["sa_unknown"] ?? "Unknown";
|
||||||
|
|
||||||
|
if (command != null)
|
||||||
|
Helper.SendDiscordLogMessage(caller, command, _discordWebhookClientLog, _localizer);
|
||||||
Helper.LogCommand(caller, $"css_kick {player.PlayerName} {reason}");
|
Helper.LogCommand(caller, $"css_kick {player.PlayerName} {reason}");
|
||||||
|
|
||||||
if (string.IsNullOrEmpty(reason) == false)
|
if (string.IsNullOrEmpty(reason) == false)
|
||||||
@@ -472,16 +473,14 @@ namespace CS2_SimpleAdmin
|
|||||||
_command = $"ds_workshop_changelevel {map.Replace("ws:", "")}";
|
_command = $"ds_workshop_changelevel {map.Replace("ws:", "")}";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_discordWebhookClientLog != null && _localizer != null)
|
//if (_discordWebhookClientLog != null && _localizer != null)
|
||||||
{
|
//{
|
||||||
string communityUrl = caller != null ? "<" + new SteamID(caller.SteamID).ToCommunityUrl().ToString() + ">" : "<https://steamcommunity.com/profiles/0>";
|
// string communityUrl = caller != null ? "<" + new SteamID(caller.SteamID).ToCommunityUrl().ToString() + ">" : "<https://steamcommunity.com/profiles/0>";
|
||||||
string commandName = command?.GetCommandString ?? "css_changemap";
|
// string commandName = command?.GetCommandString ?? "css_changemap";
|
||||||
_discordWebhookClientLog.SendMessageAsync(Helper.GenerateMessageDiscord(_localizer["sa_discord_log_command", $"[{callerName}]({communityUrl})", commandName]));
|
// _discordWebhookClientLog.SendMessageAsync(Helper.GenerateMessageDiscord(_localizer["sa_discord_log_command", $"[{callerName}]({communityUrl})", commandName]));
|
||||||
}
|
//}
|
||||||
if (command is not null)
|
|
||||||
Helper.LogCommand(caller, command);
|
|
||||||
|
|
||||||
AddTimer(2.0f, () =>
|
AddTimer(3.0f, () =>
|
||||||
{
|
{
|
||||||
Server.ExecuteCommand(_command);
|
Server.ExecuteCommand(_command);
|
||||||
}, CounterStrikeSharp.API.Modules.Timers.TimerFlags.STOP_ON_MAPCHANGE);
|
}, CounterStrikeSharp.API.Modules.Timers.TimerFlags.STOP_ON_MAPCHANGE);
|
||||||
@@ -499,6 +498,11 @@ namespace CS2_SimpleAdmin
|
|||||||
Server.PrintToConsole(msg);
|
Server.PrintToConsole(msg);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
AddTimer(3.0f, () =>
|
||||||
|
{
|
||||||
|
Server.ExecuteCommand($"changelevel {map}");
|
||||||
|
}, CounterStrikeSharp.API.Modules.Timers.TimerFlags.STOP_ON_MAPCHANGE);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (caller == null || caller != null && !silentPlayers.Contains(caller.Slot))
|
if (caller == null || caller != null && !silentPlayers.Contains(caller.Slot))
|
||||||
@@ -514,12 +518,10 @@ namespace CS2_SimpleAdmin
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!map.StartsWith("ws:"))
|
if (command != null)
|
||||||
{
|
{
|
||||||
AddTimer(2.0f, () =>
|
Helper.SendDiscordLogMessage(caller, command, _discordWebhookClientLog, _localizer);
|
||||||
{
|
Helper.LogCommand(caller, command);
|
||||||
Server.ExecuteCommand($"changelevel {map}");
|
|
||||||
}, CounterStrikeSharp.API.Modules.Timers.TimerFlags.STOP_ON_MAPCHANGE);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -563,19 +565,25 @@ namespace CS2_SimpleAdmin
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_discordWebhookClientLog != null && _localizer != null)
|
//if (_discordWebhookClientLog != null && _localizer != null)
|
||||||
{
|
//{
|
||||||
string communityUrl = caller != null ? "<" + new SteamID(caller.SteamID).ToCommunityUrl().ToString() + ">" : "<https://steamcommunity.com/profiles/0>";
|
// string communityUrl = caller != null ? "<" + new SteamID(caller.SteamID).ToCommunityUrl().ToString() + ">" : "<https://steamcommunity.com/profiles/0>";
|
||||||
string commandName = command?.GetCommandString ?? "css_changewsmap";
|
// string commandName = command?.GetCommandString ?? "css_changewsmap";
|
||||||
_discordWebhookClientLog.SendMessageAsync(Helper.GenerateMessageDiscord(_localizer["sa_discord_log_command", $"[{callerName}]({communityUrl})", commandName]));
|
// _discordWebhookClientLog.SendMessageAsync(Helper.GenerateMessageDiscord(_localizer["sa_discord_log_command", $"[{callerName}]({communityUrl})", commandName]));
|
||||||
}
|
//}
|
||||||
if (command is not null)
|
//if (command is not null)
|
||||||
Helper.LogCommand(caller, command);
|
// Helper.LogCommand(caller, command);
|
||||||
|
|
||||||
AddTimer(2.0f, () =>
|
AddTimer(3.0f, () =>
|
||||||
{
|
{
|
||||||
Server.ExecuteCommand(_command);
|
Server.ExecuteCommand(_command);
|
||||||
}, CounterStrikeSharp.API.Modules.Timers.TimerFlags.STOP_ON_MAPCHANGE);
|
}, CounterStrikeSharp.API.Modules.Timers.TimerFlags.STOP_ON_MAPCHANGE);
|
||||||
|
|
||||||
|
if (command != null)
|
||||||
|
{
|
||||||
|
Helper.SendDiscordLogMessage(caller, command, _discordWebhookClientLog, _localizer);
|
||||||
|
Helper.LogCommand(caller, command);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[ConsoleCommand("css_cvar", "Change a cvar.")]
|
[ConsoleCommand("css_cvar", "Change a cvar.")]
|
||||||
@@ -599,7 +607,6 @@ namespace CS2_SimpleAdmin
|
|||||||
}
|
}
|
||||||
|
|
||||||
Helper.SendDiscordLogMessage(caller, command, _discordWebhookClientLog, _localizer);
|
Helper.SendDiscordLogMessage(caller, command, _discordWebhookClientLog, _localizer);
|
||||||
|
|
||||||
Helper.LogCommand(caller, command);
|
Helper.LogCommand(caller, command);
|
||||||
|
|
||||||
var value = command.GetArg(2);
|
var value = command.GetArg(2);
|
||||||
@@ -618,7 +625,6 @@ namespace CS2_SimpleAdmin
|
|||||||
string callerName = caller == null ? "Console" : caller.PlayerName;
|
string callerName = caller == null ? "Console" : caller.PlayerName;
|
||||||
|
|
||||||
Helper.SendDiscordLogMessage(caller, command, _discordWebhookClientLog, _localizer);
|
Helper.SendDiscordLogMessage(caller, command, _discordWebhookClientLog, _localizer);
|
||||||
|
|
||||||
Helper.LogCommand(caller, command);
|
Helper.LogCommand(caller, command);
|
||||||
|
|
||||||
Server.ExecuteCommand(command.ArgString);
|
Server.ExecuteCommand(command.ArgString);
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ using CounterStrikeSharp.API.Core.Translations;
|
|||||||
using CounterStrikeSharp.API.Modules.Admin;
|
using CounterStrikeSharp.API.Modules.Admin;
|
||||||
using CounterStrikeSharp.API.Modules.Commands;
|
using CounterStrikeSharp.API.Modules.Commands;
|
||||||
using CounterStrikeSharp.API.Modules.Commands.Targeting;
|
using CounterStrikeSharp.API.Modules.Commands.Targeting;
|
||||||
using CounterStrikeSharp.API.Modules.Entities;
|
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
|
||||||
namespace CS2_SimpleAdmin
|
namespace CS2_SimpleAdmin
|
||||||
@@ -21,7 +20,7 @@ namespace CS2_SimpleAdmin
|
|||||||
string callerName = caller == null ? "Console" : caller.PlayerName;
|
string callerName = caller == null ? "Console" : caller.PlayerName;
|
||||||
|
|
||||||
int time = 0;
|
int time = 0;
|
||||||
string reason = CS2_SimpleAdmin._localizer?["sa_unknown"] ?? "Unknown";
|
string reason = _localizer?["sa_unknown"] ?? "Unknown";
|
||||||
|
|
||||||
TargetResult? targets = GetTarget(command);
|
TargetResult? targets = GetTarget(command);
|
||||||
if (targets == null) return;
|
if (targets == null) return;
|
||||||
@@ -32,10 +31,6 @@ namespace CS2_SimpleAdmin
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Helper.SendDiscordLogMessage(caller, command, _discordWebhookClientLog, _localizer);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
int.TryParse(command.GetArg(2), out time);
|
int.TryParse(command.GetArg(2), out time);
|
||||||
|
|
||||||
if (command.ArgCount >= 3 && command.GetArg(3).Length > 0)
|
if (command.ArgCount >= 3 && command.GetArg(3).Length > 0)
|
||||||
@@ -48,13 +43,12 @@ namespace CS2_SimpleAdmin
|
|||||||
{
|
{
|
||||||
if (caller!.CanTarget(player))
|
if (caller!.CanTarget(player))
|
||||||
{
|
{
|
||||||
Gag(caller, player, time, reason, callerName, _muteManager, playerPenaltyManager);
|
Gag(caller, player, time, reason, callerName, _muteManager, playerPenaltyManager, command);
|
||||||
Helper.SendDiscordPenaltyMessage(caller, player, reason, time, Helper.PenaltyType.Gag, _discordWebhookClientPenalty, _localizer);
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
internal void Gag(CCSPlayerController? caller, CCSPlayerController player, int time, string reason, string? callerName = null, MuteManager? muteManager = null, PlayerPenaltyManager? playerPenaltyManager = null)
|
internal void Gag(CCSPlayerController? caller, CCSPlayerController player, int time, string reason, string? callerName = null, MuteManager? muteManager = null, PlayerPenaltyManager? playerPenaltyManager = null, CommandInfo? command = null)
|
||||||
{
|
{
|
||||||
if (_database == null) return;
|
if (_database == null) return;
|
||||||
callerName ??= caller == null ? "Console" : caller.PlayerName;
|
callerName ??= caller == null ? "Console" : caller.PlayerName;
|
||||||
@@ -75,8 +69,6 @@ namespace CS2_SimpleAdmin
|
|||||||
IpAddress = caller?.IpAddress?.Split(":")[0]
|
IpAddress = caller?.IpAddress?.Split(":")[0]
|
||||||
};
|
};
|
||||||
|
|
||||||
Helper.LogCommand(caller, $"css_gag {player?.SteamID} {time} {reason}");
|
|
||||||
|
|
||||||
Task.Run(async () =>
|
Task.Run(async () =>
|
||||||
{
|
{
|
||||||
await muteManager.MutePlayer(playerInfo, adminInfo, reason, time);
|
await muteManager.MutePlayer(playerInfo, adminInfo, reason, time);
|
||||||
@@ -132,6 +124,13 @@ namespace CS2_SimpleAdmin
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (command != null)
|
||||||
|
{
|
||||||
|
Helper.SendDiscordLogMessage(caller, command, _discordWebhookClientLog, _localizer);
|
||||||
|
Helper.SendDiscordPenaltyMessage(caller, player, reason, time, Helper.PenaltyType.Gag, _discordWebhookClientPenalty, _localizer);
|
||||||
|
Helper.LogCommand(caller, command);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[ConsoleCommand("css_addgag")]
|
[ConsoleCommand("css_addgag")]
|
||||||
@@ -155,10 +154,8 @@ namespace CS2_SimpleAdmin
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Helper.SendDiscordLogMessage(caller, command, _discordWebhookClientLog, _localizer);
|
|
||||||
|
|
||||||
int time = 0;
|
int time = 0;
|
||||||
string reason = CS2_SimpleAdmin._localizer?["sa_unknown"] ?? "Unknown";
|
string reason = _localizer?["sa_unknown"] ?? "Unknown";
|
||||||
|
|
||||||
MuteManager _muteManager = new(_database);
|
MuteManager _muteManager = new(_database);
|
||||||
PlayerPenaltyManager playerPenaltyManager = new PlayerPenaltyManager();
|
PlayerPenaltyManager playerPenaltyManager = new PlayerPenaltyManager();
|
||||||
@@ -175,8 +172,6 @@ namespace CS2_SimpleAdmin
|
|||||||
IpAddress = caller?.IpAddress?.Split(":")[0]
|
IpAddress = caller?.IpAddress?.Split(":")[0]
|
||||||
};
|
};
|
||||||
|
|
||||||
Helper.LogCommand(caller, command);
|
|
||||||
|
|
||||||
List<CCSPlayerController> matches = Helper.GetPlayerFromSteamid64(steamid);
|
List<CCSPlayerController> matches = Helper.GetPlayerFromSteamid64(steamid);
|
||||||
if (matches.Count == 1)
|
if (matches.Count == 1)
|
||||||
{
|
{
|
||||||
@@ -237,6 +232,8 @@ namespace CS2_SimpleAdmin
|
|||||||
|
|
||||||
playerPenaltyManager.AddPenalty(player!.Slot, PenaltyType.Gag, DateTime.Now.AddMinutes(time), time);
|
playerPenaltyManager.AddPenalty(player!.Slot, PenaltyType.Gag, DateTime.Now.AddMinutes(time), time);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Helper.SendDiscordPenaltyMessage(caller, player, reason, time, Helper.PenaltyType.Gag, _discordWebhookClientPenalty, _localizer);
|
||||||
}
|
}
|
||||||
|
|
||||||
Task.Run(async () =>
|
Task.Run(async () =>
|
||||||
@@ -244,7 +241,13 @@ namespace CS2_SimpleAdmin
|
|||||||
await _muteManager.AddMuteBySteamid(steamid, adminInfo, reason, time, 0);
|
await _muteManager.AddMuteBySteamid(steamid, adminInfo, reason, time, 0);
|
||||||
});
|
});
|
||||||
|
|
||||||
command.ReplyToCommand($"Gagged player with steamid {steamid}.");
|
if (command != null)
|
||||||
|
{
|
||||||
|
Helper.SendDiscordLogMessage(caller, command, _discordWebhookClientLog, _localizer);
|
||||||
|
Helper.LogCommand(caller, command);
|
||||||
|
}
|
||||||
|
|
||||||
|
command?.ReplyToCommand($"Gagged player with steamid {steamid}.");
|
||||||
}
|
}
|
||||||
|
|
||||||
[ConsoleCommand("css_ungag")]
|
[ConsoleCommand("css_ungag")]
|
||||||
@@ -264,7 +267,6 @@ namespace CS2_SimpleAdmin
|
|||||||
}
|
}
|
||||||
|
|
||||||
Helper.SendDiscordLogMessage(caller, command, _discordWebhookClientLog, _localizer);
|
Helper.SendDiscordLogMessage(caller, command, _discordWebhookClientLog, _localizer);
|
||||||
|
|
||||||
Helper.LogCommand(caller, command);
|
Helper.LogCommand(caller, command);
|
||||||
|
|
||||||
bool found = false;
|
bool found = false;
|
||||||
@@ -366,7 +368,7 @@ namespace CS2_SimpleAdmin
|
|||||||
string callerName = caller == null ? "Console" : caller.PlayerName;
|
string callerName = caller == null ? "Console" : caller.PlayerName;
|
||||||
|
|
||||||
int time = 0;
|
int time = 0;
|
||||||
string reason = CS2_SimpleAdmin._localizer?["sa_unknown"] ?? "Unknown";
|
string reason = _localizer?["sa_unknown"] ?? "Unknown";
|
||||||
|
|
||||||
TargetResult? targets = GetTarget(command);
|
TargetResult? targets = GetTarget(command);
|
||||||
if (targets == null) return;
|
if (targets == null) return;
|
||||||
@@ -377,8 +379,6 @@ namespace CS2_SimpleAdmin
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Helper.SendDiscordLogMessage(caller, command, _discordWebhookClientLog, _localizer);
|
|
||||||
|
|
||||||
int.TryParse(command.GetArg(2), out time);
|
int.TryParse(command.GetArg(2), out time);
|
||||||
|
|
||||||
if (command.ArgCount >= 3 && command.GetArg(3).Length > 0)
|
if (command.ArgCount >= 3 && command.GetArg(3).Length > 0)
|
||||||
@@ -391,13 +391,12 @@ namespace CS2_SimpleAdmin
|
|||||||
{
|
{
|
||||||
if (caller!.CanTarget(player))
|
if (caller!.CanTarget(player))
|
||||||
{
|
{
|
||||||
Mute(caller, player, time, reason, callerName, _muteManager, playerPenaltyManager);
|
Mute(caller, player, time, reason, callerName, _muteManager, playerPenaltyManager, command);
|
||||||
Helper.SendDiscordPenaltyMessage(caller, player, reason, time, Helper.PenaltyType.Mute, _discordWebhookClientPenalty, _localizer);
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
internal void Mute(CCSPlayerController? caller, CCSPlayerController player, int time, string reason, string? callerName = null, MuteManager? muteManager = null, PlayerPenaltyManager? playerPenaltyManager = null)
|
internal void Mute(CCSPlayerController? caller, CCSPlayerController player, int time, string reason, string? callerName = null, MuteManager? muteManager = null, PlayerPenaltyManager? playerPenaltyManager = null, CommandInfo? command = null)
|
||||||
{
|
{
|
||||||
if (_database == null) return;
|
if (_database == null) return;
|
||||||
callerName ??= caller == null ? "Console" : caller.PlayerName;
|
callerName ??= caller == null ? "Console" : caller.PlayerName;
|
||||||
@@ -418,8 +417,6 @@ namespace CS2_SimpleAdmin
|
|||||||
IpAddress = caller?.IpAddress?.Split(":")[0]
|
IpAddress = caller?.IpAddress?.Split(":")[0]
|
||||||
};
|
};
|
||||||
|
|
||||||
Helper.LogCommand(caller, $"css_mute {player?.SteamID} {time} {reason}");
|
|
||||||
|
|
||||||
player!.VoiceFlags = VoiceFlags.Muted;
|
player!.VoiceFlags = VoiceFlags.Muted;
|
||||||
|
|
||||||
Task.Run(async () =>
|
Task.Run(async () =>
|
||||||
@@ -470,6 +467,13 @@ namespace CS2_SimpleAdmin
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (command != null)
|
||||||
|
{
|
||||||
|
Helper.SendDiscordLogMessage(caller, command, _discordWebhookClientLog, _localizer);
|
||||||
|
Helper.SendDiscordPenaltyMessage(caller, player, reason, time, Helper.PenaltyType.Mute, _discordWebhookClientPenalty, _localizer);
|
||||||
|
Helper.LogCommand(caller, command);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[ConsoleCommand("css_addmute")]
|
[ConsoleCommand("css_addmute")]
|
||||||
@@ -492,12 +496,8 @@ namespace CS2_SimpleAdmin
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Helper.SendDiscordLogMessage(caller, command, _discordWebhookClientLog, _localizer);
|
|
||||||
|
|
||||||
Helper.LogCommand(caller, command);
|
|
||||||
|
|
||||||
int time = 0;
|
int time = 0;
|
||||||
string reason = CS2_SimpleAdmin._localizer?["sa_unknown"] ?? "Unknown";
|
string reason = _localizer?["sa_unknown"] ?? "Unknown";
|
||||||
|
|
||||||
MuteManager _muteManager = new(_database);
|
MuteManager _muteManager = new(_database);
|
||||||
PlayerPenaltyManager playerPenaltyManager = new PlayerPenaltyManager();
|
PlayerPenaltyManager playerPenaltyManager = new PlayerPenaltyManager();
|
||||||
@@ -569,6 +569,8 @@ namespace CS2_SimpleAdmin
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Helper.SendDiscordPenaltyMessage(caller, player, reason, time, Helper.PenaltyType.Mute, _discordWebhookClientPenalty, _localizer);
|
||||||
}
|
}
|
||||||
|
|
||||||
Task.Run(async () =>
|
Task.Run(async () =>
|
||||||
@@ -576,7 +578,13 @@ namespace CS2_SimpleAdmin
|
|||||||
await _muteManager.AddMuteBySteamid(steamid, adminInfo, reason, time, 1);
|
await _muteManager.AddMuteBySteamid(steamid, adminInfo, reason, time, 1);
|
||||||
});
|
});
|
||||||
|
|
||||||
command.ReplyToCommand($"Muted player with steamid {steamid}.");
|
if (command != null)
|
||||||
|
{
|
||||||
|
Helper.SendDiscordLogMessage(caller, command, _discordWebhookClientLog, _localizer);
|
||||||
|
Helper.LogCommand(caller, command);
|
||||||
|
}
|
||||||
|
|
||||||
|
command?.ReplyToCommand($"Muted player with steamid {steamid}.");
|
||||||
}
|
}
|
||||||
|
|
||||||
[ConsoleCommand("css_unmute")]
|
[ConsoleCommand("css_unmute")]
|
||||||
@@ -596,7 +604,6 @@ namespace CS2_SimpleAdmin
|
|||||||
}
|
}
|
||||||
|
|
||||||
Helper.SendDiscordLogMessage(caller, command, _discordWebhookClientLog, _localizer);
|
Helper.SendDiscordLogMessage(caller, command, _discordWebhookClientLog, _localizer);
|
||||||
|
|
||||||
Helper.LogCommand(caller, command);
|
Helper.LogCommand(caller, command);
|
||||||
|
|
||||||
string pattern = command.GetArg(1);
|
string pattern = command.GetArg(1);
|
||||||
@@ -695,8 +702,6 @@ namespace CS2_SimpleAdmin
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Helper.SendDiscordLogMessage(caller, command, _discordWebhookClientLog, _localizer);
|
|
||||||
|
|
||||||
int.TryParse(command.GetArg(2), out time);
|
int.TryParse(command.GetArg(2), out time);
|
||||||
|
|
||||||
if (command.ArgCount >= 3 && command.GetArg(3).Length > 0)
|
if (command.ArgCount >= 3 && command.GetArg(3).Length > 0)
|
||||||
@@ -709,13 +714,12 @@ namespace CS2_SimpleAdmin
|
|||||||
{
|
{
|
||||||
if (caller!.CanTarget(player))
|
if (caller!.CanTarget(player))
|
||||||
{
|
{
|
||||||
Helper.SendDiscordPenaltyMessage(caller, player, reason, time, Helper.PenaltyType.Silence, _discordWebhookClientPenalty, _localizer);
|
Silence(caller, player, time, reason, callerName, _muteManager, playerPenaltyManager, command);
|
||||||
Silence(caller, player, time, reason, callerName, _muteManager, playerPenaltyManager);
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
internal void Silence(CCSPlayerController? caller, CCSPlayerController player, int time, string reason, string? callerName = null, MuteManager? muteManager = null, PlayerPenaltyManager? playerPenaltyManager = null)
|
internal void Silence(CCSPlayerController? caller, CCSPlayerController player, int time, string reason, string? callerName = null, MuteManager? muteManager = null, PlayerPenaltyManager? playerPenaltyManager = null, CommandInfo? command = null)
|
||||||
{
|
{
|
||||||
if (_database == null) return;
|
if (_database == null) return;
|
||||||
callerName ??= caller == null ? "Console" : caller.PlayerName;
|
callerName ??= caller == null ? "Console" : caller.PlayerName;
|
||||||
@@ -736,8 +740,6 @@ namespace CS2_SimpleAdmin
|
|||||||
IpAddress = caller?.IpAddress?.Split(":")[0]
|
IpAddress = caller?.IpAddress?.Split(":")[0]
|
||||||
};
|
};
|
||||||
|
|
||||||
Helper.LogCommand(caller, $"css_silence {player?.SteamID} {time} {reason}");
|
|
||||||
|
|
||||||
Task.Run(async () =>
|
Task.Run(async () =>
|
||||||
{
|
{
|
||||||
await muteManager.MutePlayer(playerInfo, adminInfo, reason, time, 2);
|
await muteManager.MutePlayer(playerInfo, adminInfo, reason, time, 2);
|
||||||
@@ -747,7 +749,6 @@ namespace CS2_SimpleAdmin
|
|||||||
Server.ExecuteCommand($"css_tag_mute {player!.SteamID}");
|
Server.ExecuteCommand($"css_tag_mute {player!.SteamID}");
|
||||||
|
|
||||||
player!.VoiceFlags = VoiceFlags.Muted;
|
player!.VoiceFlags = VoiceFlags.Muted;
|
||||||
|
|
||||||
playerPenaltyManager.AddPenalty(player!.Slot, PenaltyType.Silence, DateTime.Now.AddMinutes(time), time);
|
playerPenaltyManager.AddPenalty(player!.Slot, PenaltyType.Silence, DateTime.Now.AddMinutes(time), time);
|
||||||
|
|
||||||
if (time == 0)
|
if (time == 0)
|
||||||
@@ -796,6 +797,13 @@ namespace CS2_SimpleAdmin
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (command != null)
|
||||||
|
{
|
||||||
|
Helper.SendDiscordPenaltyMessage(caller, player, reason, time, Helper.PenaltyType.Mute, _discordWebhookClientPenalty, _localizer);
|
||||||
|
Helper.SendDiscordLogMessage(caller, command, _discordWebhookClientLog, _localizer);
|
||||||
|
Helper.LogCommand(caller, command);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[ConsoleCommand("css_addsilence")]
|
[ConsoleCommand("css_addsilence")]
|
||||||
@@ -818,10 +826,6 @@ namespace CS2_SimpleAdmin
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Helper.SendDiscordLogMessage(caller, command, _discordWebhookClientLog, _localizer);
|
|
||||||
|
|
||||||
Helper.LogCommand(caller, command);
|
|
||||||
|
|
||||||
int time = 0;
|
int time = 0;
|
||||||
string reason = CS2_SimpleAdmin._localizer?["sa_unknown"] ?? "Unknown";
|
string reason = CS2_SimpleAdmin._localizer?["sa_unknown"] ?? "Unknown";
|
||||||
|
|
||||||
@@ -897,6 +901,8 @@ namespace CS2_SimpleAdmin
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Helper.SendDiscordPenaltyMessage(caller, player, reason, time, Helper.PenaltyType.Mute, _discordWebhookClientPenalty, _localizer);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Task.Run(async () =>
|
Task.Run(async () =>
|
||||||
@@ -904,7 +910,13 @@ namespace CS2_SimpleAdmin
|
|||||||
await _muteManager.AddMuteBySteamid(steamid, adminInfo, reason, time, 2);
|
await _muteManager.AddMuteBySteamid(steamid, adminInfo, reason, time, 2);
|
||||||
});
|
});
|
||||||
|
|
||||||
command.ReplyToCommand($"Silenced player with steamid {steamid}.");
|
if (command != null)
|
||||||
|
{
|
||||||
|
Helper.SendDiscordLogMessage(caller, command, _discordWebhookClientLog, _localizer);
|
||||||
|
Helper.LogCommand(caller, command);
|
||||||
|
}
|
||||||
|
|
||||||
|
command?.ReplyToCommand($"Silenced player with steamid {steamid}.");
|
||||||
}
|
}
|
||||||
|
|
||||||
[ConsoleCommand("css_unsilence")]
|
[ConsoleCommand("css_unsilence")]
|
||||||
@@ -924,7 +936,6 @@ namespace CS2_SimpleAdmin
|
|||||||
}
|
}
|
||||||
|
|
||||||
Helper.SendDiscordLogMessage(caller, command, _discordWebhookClientLog, _localizer);
|
Helper.SendDiscordLogMessage(caller, command, _discordWebhookClientLog, _localizer);
|
||||||
|
|
||||||
Helper.LogCommand(caller, command);
|
Helper.LogCommand(caller, command);
|
||||||
|
|
||||||
string pattern = command.GetArg(1);
|
string pattern = command.GetArg(1);
|
||||||
|
|||||||
@@ -3,7 +3,6 @@ using CounterStrikeSharp.API.Core.Attributes.Registration;
|
|||||||
using CounterStrikeSharp.API.Core.Translations;
|
using CounterStrikeSharp.API.Core.Translations;
|
||||||
using CounterStrikeSharp.API.Modules.Admin;
|
using CounterStrikeSharp.API.Modules.Admin;
|
||||||
using CounterStrikeSharp.API.Modules.Commands;
|
using CounterStrikeSharp.API.Modules.Commands;
|
||||||
using CounterStrikeSharp.API.Modules.Entities;
|
|
||||||
using CounterStrikeSharp.API.Modules.Menu;
|
using CounterStrikeSharp.API.Modules.Menu;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
|
||||||
@@ -21,7 +20,6 @@ namespace CS2_SimpleAdmin
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
Helper.SendDiscordLogMessage(caller, command, _discordWebhookClientLog, _localizer);
|
Helper.SendDiscordLogMessage(caller, command, _discordWebhookClientLog, _localizer);
|
||||||
|
|
||||||
Helper.LogCommand(caller, command);
|
Helper.LogCommand(caller, command);
|
||||||
|
|
||||||
voteAnswers.Clear();
|
voteAnswers.Clear();
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ using CounterStrikeSharp.API.Core.Translations;
|
|||||||
using CounterStrikeSharp.API.Modules.Admin;
|
using CounterStrikeSharp.API.Modules.Admin;
|
||||||
using CounterStrikeSharp.API.Modules.Commands;
|
using CounterStrikeSharp.API.Modules.Commands;
|
||||||
using CounterStrikeSharp.API.Modules.Commands.Targeting;
|
using CounterStrikeSharp.API.Modules.Commands.Targeting;
|
||||||
using CounterStrikeSharp.API.Modules.Entities;
|
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
|
||||||
namespace CS2_SimpleAdmin
|
namespace CS2_SimpleAdmin
|
||||||
@@ -113,24 +112,26 @@ namespace CS2_SimpleAdmin
|
|||||||
TargetResult? targets = GetTarget(command);
|
TargetResult? targets = GetTarget(command);
|
||||||
List<CCSPlayerController> playersToTarget = targets!.Players.Where(player => player != null && player.IsValid && player.PawnIsAlive && !player.IsHLTV).ToList();
|
List<CCSPlayerController> playersToTarget = targets!.Players.Where(player => player != null && player.IsValid && player.PawnIsAlive && !player.IsHLTV).ToList();
|
||||||
|
|
||||||
Helper.SendDiscordLogMessage(caller, command, _discordWebhookClientLog, _localizer);
|
|
||||||
|
|
||||||
playersToTarget.ForEach(player =>
|
playersToTarget.ForEach(player =>
|
||||||
{
|
{
|
||||||
if (!player.IsBot && player.SteamID.ToString().Length != 17)
|
if (!player.IsBot && player.SteamID.ToString().Length != 17)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
Unfreeze(caller, player, callerName);
|
Unfreeze(caller, player, callerName, command);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Unfreeze(CCSPlayerController? caller, CCSPlayerController player, string? callerName = null)
|
public void Unfreeze(CCSPlayerController? caller, CCSPlayerController player, string? callerName = null, CommandInfo? command = null)
|
||||||
{
|
{
|
||||||
callerName ??= caller == null ? "Console" : caller.PlayerName;
|
callerName ??= caller == null ? "Console" : caller.PlayerName;
|
||||||
|
|
||||||
player!.Pawn.Value!.Unfreeze();
|
player!.Pawn.Value!.Unfreeze();
|
||||||
|
|
||||||
Helper.LogCommand(caller, $"css_unfreeze {player.PlayerName}");
|
if (command != null)
|
||||||
|
{
|
||||||
|
Helper.LogCommand(caller, command);
|
||||||
|
Helper.SendDiscordLogMessage(caller, command, _discordWebhookClientLog, _localizer);
|
||||||
|
}
|
||||||
|
|
||||||
if (caller == null || caller != null && !silentPlayers.Contains(caller.Slot))
|
if (caller == null || caller != null && !silentPlayers.Contains(caller.Slot))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ using CounterStrikeSharp.API.Core.Translations;
|
|||||||
using CounterStrikeSharp.API.Modules.Admin;
|
using CounterStrikeSharp.API.Modules.Admin;
|
||||||
using CounterStrikeSharp.API.Modules.Commands;
|
using CounterStrikeSharp.API.Modules.Commands;
|
||||||
using CounterStrikeSharp.API.Modules.Commands.Targeting;
|
using CounterStrikeSharp.API.Modules.Commands.Targeting;
|
||||||
using CounterStrikeSharp.API.Modules.Entities;
|
|
||||||
using CounterStrikeSharp.API.Modules.Entities.Constants;
|
using CounterStrikeSharp.API.Modules.Entities.Constants;
|
||||||
using CounterStrikeSharp.API.Modules.Memory;
|
using CounterStrikeSharp.API.Modules.Memory;
|
||||||
using CounterStrikeSharp.API.Modules.Utils;
|
using CounterStrikeSharp.API.Modules.Utils;
|
||||||
@@ -23,17 +22,15 @@ namespace CS2_SimpleAdmin
|
|||||||
TargetResult? targets = GetTarget(command);
|
TargetResult? targets = GetTarget(command);
|
||||||
if (targets == null) return;
|
if (targets == null) return;
|
||||||
|
|
||||||
Helper.SendDiscordLogMessage(caller, command, _discordWebhookClientLog, _localizer);
|
|
||||||
|
|
||||||
List<CCSPlayerController> playersToTarget = targets!.Players.Where(player => player != null && player.IsValid && player.PawnIsAlive && !player.IsHLTV).ToList();
|
List<CCSPlayerController> playersToTarget = targets!.Players.Where(player => player != null && player.IsValid && player.PawnIsAlive && !player.IsHLTV).ToList();
|
||||||
|
|
||||||
playersToTarget.ForEach(player =>
|
playersToTarget.ForEach(player =>
|
||||||
{
|
{
|
||||||
Slay(caller, player, callerName);
|
Slay(caller, player, callerName, command);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Slay(CCSPlayerController? caller, CCSPlayerController player, string? callerName = null)
|
public void Slay(CCSPlayerController? caller, CCSPlayerController player, string? callerName = null, CommandInfo? command = null)
|
||||||
{
|
{
|
||||||
if (!player.IsBot && player.SteamID.ToString().Length != 17)
|
if (!player.IsBot && player.SteamID.ToString().Length != 17)
|
||||||
return;
|
return;
|
||||||
@@ -42,7 +39,11 @@ namespace CS2_SimpleAdmin
|
|||||||
|
|
||||||
player.CommitSuicide(false, true);
|
player.CommitSuicide(false, true);
|
||||||
|
|
||||||
Helper.LogCommand(caller, $"css_slay {player.PlayerName}");
|
if (command != null)
|
||||||
|
{
|
||||||
|
Helper.SendDiscordLogMessage(caller, command, _discordWebhookClientLog, _localizer);
|
||||||
|
Helper.LogCommand(caller, command);
|
||||||
|
}
|
||||||
|
|
||||||
if (caller == null || caller != null && !silentPlayers.Contains(caller.Slot))
|
if (caller == null || caller != null && !silentPlayers.Contains(caller.Slot))
|
||||||
{
|
{
|
||||||
@@ -94,14 +95,12 @@ namespace CS2_SimpleAdmin
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Helper.SendDiscordLogMessage(caller, command, _discordWebhookClientLog, _localizer);
|
|
||||||
|
|
||||||
playersToTarget.ForEach(player =>
|
playersToTarget.ForEach(player =>
|
||||||
{
|
{
|
||||||
if (!player.IsBot && player.SteamID.ToString().Length != 17)
|
if (!player.IsBot && player.SteamID.ToString().Length != 17)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
GiveWeapon(caller, player, weaponName, callerName);
|
GiveWeapon(caller, player, weaponName, callerName, command);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -113,9 +112,13 @@ namespace CS2_SimpleAdmin
|
|||||||
SubGiveWeapon(caller, player!, weapon.ToString(), callerName);
|
SubGiveWeapon(caller, player!, weapon.ToString(), callerName);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void GiveWeapon(CCSPlayerController? caller, CCSPlayerController player, string weaponName, string? callerName = null)
|
public void GiveWeapon(CCSPlayerController? caller, CCSPlayerController player, string weaponName, string? callerName = null, CommandInfo? command = null)
|
||||||
{
|
{
|
||||||
Helper.LogCommand(caller, $"css_give {player?.PlayerName} {weaponName}");
|
if (command != null)
|
||||||
|
{
|
||||||
|
Helper.LogCommand(caller, command);
|
||||||
|
Helper.SendDiscordLogMessage(caller, command, _discordWebhookClientLog, _localizer);
|
||||||
|
}
|
||||||
|
|
||||||
player?.GiveNamedItem(weaponName);
|
player?.GiveNamedItem(weaponName);
|
||||||
SubGiveWeapon(caller, player!, weaponName, callerName);
|
SubGiveWeapon(caller, player!, weaponName, callerName);
|
||||||
@@ -148,20 +151,18 @@ namespace CS2_SimpleAdmin
|
|||||||
TargetResult? targets = GetTarget(command);
|
TargetResult? targets = GetTarget(command);
|
||||||
if (targets == null) return;
|
if (targets == null) return;
|
||||||
|
|
||||||
Helper.SendDiscordLogMessage(caller, command, _discordWebhookClientLog, _localizer);
|
|
||||||
|
|
||||||
List<CCSPlayerController> playersToTarget = targets!.Players.Where(player => player != null && player.IsValid && player.PawnIsAlive && !player.IsHLTV).ToList();
|
List<CCSPlayerController> playersToTarget = targets!.Players.Where(player => player != null && player.IsValid && player.PawnIsAlive && !player.IsHLTV).ToList();
|
||||||
|
|
||||||
playersToTarget.ForEach(player =>
|
playersToTarget.ForEach(player =>
|
||||||
{
|
{
|
||||||
if (caller!.CanTarget(player))
|
if (caller!.CanTarget(player))
|
||||||
{
|
{
|
||||||
StripWeapons(caller, player, callerName);
|
StripWeapons(caller, player, callerName, command);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void StripWeapons(CCSPlayerController? caller, CCSPlayerController player, string? callerName = null)
|
public void StripWeapons(CCSPlayerController? caller, CCSPlayerController player, string? callerName = null, CommandInfo? command = null)
|
||||||
{
|
{
|
||||||
callerName ??= caller == null ? "Console" : caller.PlayerName;
|
callerName ??= caller == null ? "Console" : caller.PlayerName;
|
||||||
|
|
||||||
@@ -170,7 +171,11 @@ namespace CS2_SimpleAdmin
|
|||||||
|
|
||||||
player.RemoveWeapons();
|
player.RemoveWeapons();
|
||||||
|
|
||||||
Helper.LogCommand(caller, $"css_strip {player.PlayerName}");
|
if (command != null)
|
||||||
|
{
|
||||||
|
Helper.LogCommand(caller, command);
|
||||||
|
Helper.SendDiscordLogMessage(caller, command, _discordWebhookClientLog, _localizer);
|
||||||
|
}
|
||||||
|
|
||||||
if (caller == null || caller != null && !silentPlayers.Contains(caller.Slot))
|
if (caller == null || caller != null && !silentPlayers.Contains(caller.Slot))
|
||||||
{
|
{
|
||||||
@@ -198,20 +203,18 @@ namespace CS2_SimpleAdmin
|
|||||||
TargetResult? targets = GetTarget(command);
|
TargetResult? targets = GetTarget(command);
|
||||||
if (targets == null) return;
|
if (targets == null) return;
|
||||||
|
|
||||||
Helper.SendDiscordLogMessage(caller, command, _discordWebhookClientLog, _localizer);
|
|
||||||
|
|
||||||
List<CCSPlayerController> playersToTarget = targets!.Players.Where(player => player != null && player.IsValid && player.PawnIsAlive && !player.IsHLTV).ToList();
|
List<CCSPlayerController> playersToTarget = targets!.Players.Where(player => player != null && player.IsValid && player.PawnIsAlive && !player.IsHLTV).ToList();
|
||||||
|
|
||||||
playersToTarget.ForEach(player =>
|
playersToTarget.ForEach(player =>
|
||||||
{
|
{
|
||||||
if (caller!.CanTarget(player))
|
if (caller!.CanTarget(player))
|
||||||
{
|
{
|
||||||
SetHp(caller, player, health, callerName);
|
SetHp(caller, player, health, callerName, command);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetHp(CCSPlayerController? caller, CCSPlayerController player, int health, string? callerName = null)
|
public void SetHp(CCSPlayerController? caller, CCSPlayerController player, int health, string? callerName = null, CommandInfo? command = null)
|
||||||
{
|
{
|
||||||
if (!player.IsBot && player.SteamID.ToString().Length != 17)
|
if (!player.IsBot && player.SteamID.ToString().Length != 17)
|
||||||
return;
|
return;
|
||||||
@@ -220,7 +223,11 @@ namespace CS2_SimpleAdmin
|
|||||||
|
|
||||||
player.SetHp(health);
|
player.SetHp(health);
|
||||||
|
|
||||||
Helper.LogCommand(caller, $"css_hp {player.PlayerName} {health}");
|
if (command != null)
|
||||||
|
{
|
||||||
|
Helper.LogCommand(caller, command);
|
||||||
|
Helper.SendDiscordLogMessage(caller, command, _discordWebhookClientLog, _localizer);
|
||||||
|
}
|
||||||
|
|
||||||
if (caller == null || caller != null && !silentPlayers.Contains(caller.Slot))
|
if (caller == null || caller != null && !silentPlayers.Contains(caller.Slot))
|
||||||
{
|
{
|
||||||
@@ -248,8 +255,6 @@ namespace CS2_SimpleAdmin
|
|||||||
TargetResult? targets = GetTarget(command);
|
TargetResult? targets = GetTarget(command);
|
||||||
if (targets == null) return;
|
if (targets == null) return;
|
||||||
|
|
||||||
Helper.SendDiscordLogMessage(caller, command, _discordWebhookClientLog, _localizer);
|
|
||||||
|
|
||||||
List<CCSPlayerController> playersToTarget = targets!.Players.Where(player => player != null && player.IsValid && player.PawnIsAlive && !player.IsHLTV).ToList();
|
List<CCSPlayerController> playersToTarget = targets!.Players.Where(player => player != null && player.IsValid && player.PawnIsAlive && !player.IsHLTV).ToList();
|
||||||
|
|
||||||
playersToTarget.ForEach(player =>
|
playersToTarget.ForEach(player =>
|
||||||
@@ -259,18 +264,22 @@ namespace CS2_SimpleAdmin
|
|||||||
|
|
||||||
if (caller!.CanTarget(player))
|
if (caller!.CanTarget(player))
|
||||||
{
|
{
|
||||||
SetSpeed(caller, player, speed, callerName);
|
SetSpeed(caller, player, speed, callerName, command);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetSpeed(CCSPlayerController? caller, CCSPlayerController player, double speed, string? callerName = null)
|
public void SetSpeed(CCSPlayerController? caller, CCSPlayerController player, double speed, string? callerName = null, CommandInfo? command = null)
|
||||||
{
|
{
|
||||||
callerName ??= caller == null ? "Console" : caller.PlayerName;
|
callerName ??= caller == null ? "Console" : caller.PlayerName;
|
||||||
|
|
||||||
player.SetSpeed((float)speed);
|
player.SetSpeed((float)speed);
|
||||||
|
|
||||||
Helper.LogCommand(caller, $"css_speed {player?.PlayerName} {speed}");
|
if (command != null)
|
||||||
|
{
|
||||||
|
Helper.LogCommand(caller, command);
|
||||||
|
Helper.SendDiscordLogMessage(caller, command, _discordWebhookClientLog, _localizer);
|
||||||
|
}
|
||||||
|
|
||||||
if (caller == null || caller != null && !silentPlayers.Contains(caller.Slot))
|
if (caller == null || caller != null && !silentPlayers.Contains(caller.Slot))
|
||||||
{
|
{
|
||||||
@@ -309,18 +318,22 @@ namespace CS2_SimpleAdmin
|
|||||||
|
|
||||||
if (caller!.CanTarget(player))
|
if (caller!.CanTarget(player))
|
||||||
{
|
{
|
||||||
SetGravity(caller, player, gravity, callerName);
|
SetGravity(caller, player, gravity, callerName, command);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetGravity(CCSPlayerController? caller, CCSPlayerController player, double gravity, string? callerName = null)
|
public void SetGravity(CCSPlayerController? caller, CCSPlayerController player, double gravity, string? callerName = null, CommandInfo? command = null)
|
||||||
{
|
{
|
||||||
callerName ??= caller == null ? "Console" : caller.PlayerName;
|
callerName ??= caller == null ? "Console" : caller.PlayerName;
|
||||||
|
|
||||||
player.SetGravity((float)gravity);
|
player.SetGravity((float)gravity);
|
||||||
|
|
||||||
Helper.LogCommand(caller, $"css_gravity {player?.PlayerName} {gravity}");
|
if (command != null)
|
||||||
|
{
|
||||||
|
Helper.LogCommand(caller, command);
|
||||||
|
Helper.SendDiscordLogMessage(caller, command, _discordWebhookClientLog, _localizer);
|
||||||
|
}
|
||||||
|
|
||||||
if (caller == null || caller != null && !silentPlayers.Contains(caller.Slot))
|
if (caller == null || caller != null && !silentPlayers.Contains(caller.Slot))
|
||||||
{
|
{
|
||||||
@@ -348,8 +361,6 @@ namespace CS2_SimpleAdmin
|
|||||||
TargetResult? targets = GetTarget(command);
|
TargetResult? targets = GetTarget(command);
|
||||||
if (targets == null) return;
|
if (targets == null) return;
|
||||||
|
|
||||||
Helper.SendDiscordLogMessage(caller, command, _discordWebhookClientLog, _localizer);
|
|
||||||
|
|
||||||
List<CCSPlayerController> playersToTarget = targets!.Players.Where(player => player != null && player.IsValid && player.PawnIsAlive && !player.IsHLTV).ToList();
|
List<CCSPlayerController> playersToTarget = targets!.Players.Where(player => player != null && player.IsValid && player.PawnIsAlive && !player.IsHLTV).ToList();
|
||||||
|
|
||||||
playersToTarget.ForEach(player =>
|
playersToTarget.ForEach(player =>
|
||||||
@@ -359,18 +370,22 @@ namespace CS2_SimpleAdmin
|
|||||||
|
|
||||||
if (caller!.CanTarget(player))
|
if (caller!.CanTarget(player))
|
||||||
{
|
{
|
||||||
SetMoney(caller, player, money, callerName);
|
SetMoney(caller, player, money, callerName, command);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetMoney(CCSPlayerController? caller, CCSPlayerController player, int money, string? callerName = null)
|
public void SetMoney(CCSPlayerController? caller, CCSPlayerController player, int money, string? callerName = null, CommandInfo? command = null)
|
||||||
{
|
{
|
||||||
callerName ??= caller == null ? "Console" : caller.PlayerName;
|
callerName ??= caller == null ? "Console" : caller.PlayerName;
|
||||||
|
|
||||||
player.SetMoney(money);
|
player.SetMoney(money);
|
||||||
|
|
||||||
Helper.LogCommand(caller, $"css_money {player?.PlayerName} {money}");
|
if (command != null)
|
||||||
|
{
|
||||||
|
Helper.LogCommand(caller, command);
|
||||||
|
Helper.SendDiscordLogMessage(caller, command, _discordWebhookClientLog, _localizer);
|
||||||
|
}
|
||||||
|
|
||||||
if (caller == null || caller != null && !silentPlayers.Contains(caller.Slot))
|
if (caller == null || caller != null && !silentPlayers.Contains(caller.Slot))
|
||||||
{
|
{
|
||||||
@@ -395,8 +410,6 @@ namespace CS2_SimpleAdmin
|
|||||||
TargetResult? targets = GetTarget(command);
|
TargetResult? targets = GetTarget(command);
|
||||||
if (targets == null) return;
|
if (targets == null) return;
|
||||||
|
|
||||||
Helper.SendDiscordLogMessage(caller, command, _discordWebhookClientLog, _localizer);
|
|
||||||
|
|
||||||
List<CCSPlayerController> playersToTarget = targets!.Players.Where(player => player != null && player.IsValid && player.PawnIsAlive && !player.IsHLTV).ToList();
|
List<CCSPlayerController> playersToTarget = targets!.Players.Where(player => player != null && player.IsValid && player.PawnIsAlive && !player.IsHLTV).ToList();
|
||||||
|
|
||||||
playersToTarget.ForEach(player =>
|
playersToTarget.ForEach(player =>
|
||||||
@@ -406,18 +419,22 @@ namespace CS2_SimpleAdmin
|
|||||||
|
|
||||||
if (caller!.CanTarget(player))
|
if (caller!.CanTarget(player))
|
||||||
{
|
{
|
||||||
God(caller, player, callerName);
|
God(caller, player, callerName, command);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void God(CCSPlayerController? caller, CCSPlayerController player, string? callerName = null)
|
public void God(CCSPlayerController? caller, CCSPlayerController player, string? callerName = null, CommandInfo? command = null)
|
||||||
{
|
{
|
||||||
callerName ??= caller == null ? "Console" : caller.PlayerName;
|
callerName ??= caller == null ? "Console" : caller.PlayerName;
|
||||||
|
|
||||||
if (player != null)
|
if (player != null)
|
||||||
{
|
{
|
||||||
Helper.LogCommand(caller, $"css_god {player.PlayerName}");
|
if (command != null)
|
||||||
|
{
|
||||||
|
Helper.LogCommand(caller, command);
|
||||||
|
Helper.SendDiscordLogMessage(caller, command, _discordWebhookClientLog, _localizer);
|
||||||
|
}
|
||||||
|
|
||||||
if (!godPlayers.Contains(player.Slot))
|
if (!godPlayers.Contains(player.Slot))
|
||||||
{
|
{
|
||||||
@@ -454,8 +471,6 @@ namespace CS2_SimpleAdmin
|
|||||||
TargetResult? targets = GetTarget(command);
|
TargetResult? targets = GetTarget(command);
|
||||||
if (targets == null) return;
|
if (targets == null) return;
|
||||||
|
|
||||||
Helper.SendDiscordLogMessage(caller, command, _discordWebhookClientLog, _localizer);
|
|
||||||
|
|
||||||
List<CCSPlayerController> playersToTarget = targets!.Players.Where(player => player != null && player.IsValid && player.PawnIsAlive && !player.IsHLTV).ToList();
|
List<CCSPlayerController> playersToTarget = targets!.Players.Where(player => player != null && player.IsValid && player.PawnIsAlive && !player.IsHLTV).ToList();
|
||||||
|
|
||||||
if (command.ArgCount >= 2)
|
if (command.ArgCount >= 2)
|
||||||
@@ -470,17 +485,21 @@ namespace CS2_SimpleAdmin
|
|||||||
|
|
||||||
if (caller!.CanTarget(player))
|
if (caller!.CanTarget(player))
|
||||||
{
|
{
|
||||||
Slap(caller, player, damage);
|
Slap(caller, player, damage, command);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Slap(CCSPlayerController? caller, CCSPlayerController player, int damage, string? callerName = null)
|
public void Slap(CCSPlayerController? caller, CCSPlayerController player, int damage, CommandInfo? command = null)
|
||||||
{
|
{
|
||||||
callerName ??= caller == null ? "Console" : caller.PlayerName;
|
string callerName = caller == null ? "Console" : caller.PlayerName;
|
||||||
player!.Pawn.Value!.Slap(damage);
|
player!.Pawn.Value!.Slap(damage);
|
||||||
|
|
||||||
Helper.LogCommand(caller, $"css_slap {player.PlayerName} {damage}");
|
if (command != null)
|
||||||
|
{
|
||||||
|
Helper.LogCommand(caller, command);
|
||||||
|
Helper.SendDiscordLogMessage(caller, command, _discordWebhookClientLog, _localizer);
|
||||||
|
}
|
||||||
|
|
||||||
if (caller == null || caller != null && !silentPlayers.Contains(caller.Slot))
|
if (caller == null || caller != null && !silentPlayers.Contains(caller.Slot))
|
||||||
{
|
{
|
||||||
@@ -509,8 +528,6 @@ namespace CS2_SimpleAdmin
|
|||||||
TargetResult? targets = GetTarget(command);
|
TargetResult? targets = GetTarget(command);
|
||||||
if (targets == null) return;
|
if (targets == null) return;
|
||||||
|
|
||||||
Helper.SendDiscordLogMessage(caller, command, _discordWebhookClientLog, _localizer);
|
|
||||||
|
|
||||||
List<CCSPlayerController> playersToTarget = targets!.Players.Where(player => player != null && player.IsValid && !player.IsHLTV).ToList();
|
List<CCSPlayerController> playersToTarget = targets!.Players.Where(player => player != null && player.IsValid && !player.IsHLTV).ToList();
|
||||||
|
|
||||||
switch (teamName)
|
switch (teamName)
|
||||||
@@ -540,15 +557,13 @@ namespace CS2_SimpleAdmin
|
|||||||
|
|
||||||
bool kill = command.GetArg(3).ToLower().Equals("-k");
|
bool kill = command.GetArg(3).ToLower().Equals("-k");
|
||||||
|
|
||||||
Helper.LogCommand(caller, command);
|
|
||||||
|
|
||||||
playersToTarget.ForEach(player =>
|
playersToTarget.ForEach(player =>
|
||||||
{
|
{
|
||||||
ChangeTeam(caller, player, _teamName, teamNum, kill, callerName);
|
ChangeTeam(caller, player, _teamName, teamNum, kill, callerName, command);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void ChangeTeam(CCSPlayerController? caller, CCSPlayerController player, string teamName, CsTeam teamNum, bool kill, string? callerName = null)
|
public void ChangeTeam(CCSPlayerController? caller, CCSPlayerController player, string teamName, CsTeam teamNum, bool kill, string? callerName = null, CommandInfo? command = null)
|
||||||
{
|
{
|
||||||
if (!player.IsBot && player.SteamID.ToString().Length != 17)
|
if (!player.IsBot && player.SteamID.ToString().Length != 17)
|
||||||
return;
|
return;
|
||||||
@@ -591,6 +606,12 @@ namespace CS2_SimpleAdmin
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (command != null)
|
||||||
|
{
|
||||||
|
Helper.LogCommand(caller, command);
|
||||||
|
Helper.SendDiscordLogMessage(caller, command, _discordWebhookClientLog, _localizer);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[ConsoleCommand("css_rename", "Rename a player.")]
|
[ConsoleCommand("css_rename", "Rename a player.")]
|
||||||
@@ -607,9 +628,8 @@ namespace CS2_SimpleAdmin
|
|||||||
TargetResult? targets = GetTarget(command);
|
TargetResult? targets = GetTarget(command);
|
||||||
List<CCSPlayerController> playersToTarget = targets!.Players.Where(player => player != null && player.IsValid && !player.IsHLTV).ToList();
|
List<CCSPlayerController> playersToTarget = targets!.Players.Where(player => player != null && player.IsValid && !player.IsHLTV).ToList();
|
||||||
|
|
||||||
Helper.SendDiscordLogMessage(caller, command, _discordWebhookClientLog, _localizer);
|
|
||||||
|
|
||||||
Helper.LogCommand(caller, command);
|
Helper.LogCommand(caller, command);
|
||||||
|
Helper.SendDiscordLogMessage(caller, command, _discordWebhookClientLog, _localizer);
|
||||||
|
|
||||||
playersToTarget.ForEach(player =>
|
playersToTarget.ForEach(player =>
|
||||||
{
|
{
|
||||||
@@ -618,7 +638,6 @@ namespace CS2_SimpleAdmin
|
|||||||
|
|
||||||
if (caller!.CanTarget(player))
|
if (caller!.CanTarget(player))
|
||||||
{
|
{
|
||||||
|
|
||||||
if (caller == null || caller != null && !silentPlayers.Contains(caller.Slot))
|
if (caller == null || caller != null && !silentPlayers.Contains(caller.Slot))
|
||||||
{
|
{
|
||||||
foreach (CCSPlayerController _player in Helper.GetValidPlayers())
|
foreach (CCSPlayerController _player in Helper.GetValidPlayers())
|
||||||
@@ -647,8 +666,6 @@ namespace CS2_SimpleAdmin
|
|||||||
TargetResult? targets = GetTarget(command);
|
TargetResult? targets = GetTarget(command);
|
||||||
List<CCSPlayerController> playersToTarget = targets!.Players.Where(player => player != null && player.IsValid && !player.IsHLTV).ToList();
|
List<CCSPlayerController> playersToTarget = targets!.Players.Where(player => player != null && player.IsValid && !player.IsHLTV).ToList();
|
||||||
|
|
||||||
Helper.SendDiscordLogMessage(caller, command, _discordWebhookClientLog, _localizer);
|
|
||||||
|
|
||||||
playersToTarget.ForEach(player =>
|
playersToTarget.ForEach(player =>
|
||||||
{
|
{
|
||||||
if (!player.IsBot && player.SteamID.ToString().Length != 17)
|
if (!player.IsBot && player.SteamID.ToString().Length != 17)
|
||||||
@@ -656,12 +673,12 @@ namespace CS2_SimpleAdmin
|
|||||||
|
|
||||||
if (caller!.CanTarget(player))
|
if (caller!.CanTarget(player))
|
||||||
{
|
{
|
||||||
Respawn(caller, player, callerName);
|
Respawn(caller, player, callerName, command);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Respawn(CCSPlayerController? caller, CCSPlayerController player, string? callerName = null)
|
public void Respawn(CCSPlayerController? caller, CCSPlayerController player, string? callerName = null, CommandInfo? command = null)
|
||||||
{
|
{
|
||||||
callerName ??= caller == null ? "Console" : caller.PlayerName;
|
callerName ??= caller == null ? "Console" : caller.PlayerName;
|
||||||
|
|
||||||
@@ -672,7 +689,11 @@ namespace CS2_SimpleAdmin
|
|||||||
VirtualFunction.CreateVoid<CCSPlayerController>(player.Handle,
|
VirtualFunction.CreateVoid<CCSPlayerController>(player.Handle,
|
||||||
GameData.GetOffset("CCSPlayerController_Respawn"))(player);
|
GameData.GetOffset("CCSPlayerController_Respawn"))(player);
|
||||||
|
|
||||||
Helper.LogCommand(caller, $"css_respawn {player.PlayerName}");
|
if (command != null)
|
||||||
|
{
|
||||||
|
Helper.LogCommand(caller, command);
|
||||||
|
Helper.SendDiscordLogMessage(caller, command, _discordWebhookClientLog, _localizer);
|
||||||
|
}
|
||||||
|
|
||||||
if (caller == null || caller != null && !silentPlayers.Contains(caller.Slot))
|
if (caller == null || caller != null && !silentPlayers.Contains(caller.Slot))
|
||||||
{
|
{
|
||||||
@@ -706,9 +727,8 @@ namespace CS2_SimpleAdmin
|
|||||||
|
|
||||||
List<CCSPlayerController> playersToTarget = targets!.Players.Where(player => player != null && player.IsValid && !player.IsHLTV).ToList();
|
List<CCSPlayerController> playersToTarget = targets!.Players.Where(player => player != null && player.IsValid && !player.IsHLTV).ToList();
|
||||||
|
|
||||||
Helper.SendDiscordLogMessage(caller, command, _discordWebhookClientLog, _localizer);
|
|
||||||
|
|
||||||
Helper.LogCommand(caller, command);
|
Helper.LogCommand(caller, command);
|
||||||
|
Helper.SendDiscordLogMessage(caller, command, _discordWebhookClientLog, _localizer);
|
||||||
|
|
||||||
playersToTarget.ForEach(player =>
|
playersToTarget.ForEach(player =>
|
||||||
{
|
{
|
||||||
@@ -758,10 +778,8 @@ namespace CS2_SimpleAdmin
|
|||||||
|
|
||||||
List<CCSPlayerController> playersToTarget = targets!.Players.Where(player => player != null && player.IsValid && !player.IsHLTV).ToList();
|
List<CCSPlayerController> playersToTarget = targets!.Players.Where(player => player != null && player.IsValid && !player.IsHLTV).ToList();
|
||||||
|
|
||||||
Helper.SendDiscordLogMessage(caller, command, _discordWebhookClientLog, _localizer);
|
|
||||||
|
|
||||||
|
|
||||||
Helper.LogCommand(caller, command);
|
Helper.LogCommand(caller, command);
|
||||||
|
Helper.SendDiscordLogMessage(caller, command, _discordWebhookClientLog, _localizer);
|
||||||
|
|
||||||
playersToTarget.ForEach(player =>
|
playersToTarget.ForEach(player =>
|
||||||
{
|
{
|
||||||
|
|||||||
13
Events.cs
13
Events.cs
@@ -87,7 +87,6 @@ public partial class CS2_SimpleAdmin
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
[GameEventHandler]
|
[GameEventHandler]
|
||||||
public HookResult OnPlayerFullConnect(EventPlayerConnectFull @event, GameEventInfo info)
|
public HookResult OnPlayerFullConnect(EventPlayerConnectFull @event, GameEventInfo info)
|
||||||
{
|
{
|
||||||
@@ -226,10 +225,13 @@ public partial class CS2_SimpleAdmin
|
|||||||
|
|
||||||
public HookResult OnCommandSay(CCSPlayerController? player, CommandInfo info)
|
public HookResult OnCommandSay(CCSPlayerController? player, CommandInfo info)
|
||||||
{
|
{
|
||||||
if (player is null || !player.IsValid || player.IsBot || player.IsHLTV || info.GetArg(1).Length == 0 || info.GetArg(1).StartsWith("/")
|
if (player is null || !player.IsValid || player.IsBot || player.IsHLTV || info.GetArg(1).StartsWith("/")
|
||||||
|| info.GetArg(1).StartsWith("!") && info.GetArg(1).Length >= 12)
|
|| info.GetArg(1).StartsWith("!") && info.GetArg(1).Length >= 12)
|
||||||
return HookResult.Continue;
|
return HookResult.Continue;
|
||||||
|
|
||||||
|
if (info.GetArg(1).Length == 0)
|
||||||
|
return HookResult.Handled;
|
||||||
|
|
||||||
PlayerPenaltyManager playerPenaltyManager = new PlayerPenaltyManager();
|
PlayerPenaltyManager playerPenaltyManager = new PlayerPenaltyManager();
|
||||||
|
|
||||||
if (playerPenaltyManager.IsPenalized(player.Slot, PenaltyType.Gag) || playerPenaltyManager.IsPenalized(player.Slot, PenaltyType.Silence))
|
if (playerPenaltyManager.IsPenalized(player.Slot, PenaltyType.Gag) || playerPenaltyManager.IsPenalized(player.Slot, PenaltyType.Silence))
|
||||||
@@ -240,10 +242,13 @@ public partial class CS2_SimpleAdmin
|
|||||||
|
|
||||||
public HookResult OnCommandTeamSay(CCSPlayerController? player, CommandInfo info)
|
public HookResult OnCommandTeamSay(CCSPlayerController? player, CommandInfo info)
|
||||||
{
|
{
|
||||||
if (player is null || !player.IsValid || player.IsBot || player.IsHLTV || info.GetArg(1).Length == 0 || info.GetArg(1).StartsWith("/")
|
if (player is null || !player.IsValid || player.IsBot || player.IsHLTV || info.GetArg(1).StartsWith("/")
|
||||||
|| info.GetArg(1).StartsWith("!") && info.GetArg(1).Length >= 12)
|
|| info.GetArg(1).StartsWith("!") && info.GetArg(1).Length >= 12)
|
||||||
return HookResult.Continue;
|
return HookResult.Continue;
|
||||||
|
|
||||||
|
if (info.GetArg(1).Length == 0)
|
||||||
|
return HookResult.Handled;
|
||||||
|
|
||||||
PlayerPenaltyManager playerPenaltyManager = new PlayerPenaltyManager();
|
PlayerPenaltyManager playerPenaltyManager = new PlayerPenaltyManager();
|
||||||
|
|
||||||
if (playerPenaltyManager.IsPenalized(player.Slot, PenaltyType.Gag) || playerPenaltyManager.IsPenalized(player.Slot, PenaltyType.Silence))
|
if (playerPenaltyManager.IsPenalized(player.Slot, PenaltyType.Gag) || playerPenaltyManager.IsPenalized(player.Slot, PenaltyType.Silence))
|
||||||
@@ -297,7 +302,6 @@ public partial class CS2_SimpleAdmin
|
|||||||
|
|
||||||
AddTimer(61.0f, () =>
|
AddTimer(61.0f, () =>
|
||||||
{
|
{
|
||||||
|
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
Logger.LogCritical("[OnMapStart] Expired check");
|
Logger.LogCritical("[OnMapStart] Expired check");
|
||||||
#endif
|
#endif
|
||||||
@@ -407,7 +411,6 @@ public partial class CS2_SimpleAdmin
|
|||||||
|
|
||||||
await _adminManager.GiveAllFlags();
|
await _adminManager.GiveAllFlags();
|
||||||
});
|
});
|
||||||
|
|
||||||
}, CounterStrikeSharp.API.Modules.Timers.TimerFlags.STOP_ON_MAPCHANGE);
|
}, CounterStrikeSharp.API.Modules.Timers.TimerFlags.STOP_ON_MAPCHANGE);
|
||||||
|
|
||||||
AddTimer(3.0f, () =>
|
AddTimer(3.0f, () =>
|
||||||
|
|||||||
26
Helper.cs
26
Helper.cs
@@ -216,7 +216,6 @@ namespace CS2_SimpleAdmin
|
|||||||
Silence,
|
Silence,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public static string ConvertMinutesToTime(int minutes)
|
public static string ConvertMinutesToTime(int minutes)
|
||||||
{
|
{
|
||||||
TimeSpan time = TimeSpan.FromMinutes(minutes);
|
TimeSpan time = TimeSpan.FromMinutes(minutes);
|
||||||
@@ -231,26 +230,31 @@ namespace CS2_SimpleAdmin
|
|||||||
string callercommunityUrl = caller != null ? "<" + new SteamID(caller.SteamID).ToCommunityUrl().ToString() + ">" : "<https://steamcommunity.com/profiles/0>";
|
string callercommunityUrl = caller != null ? "<" + new SteamID(caller.SteamID).ToCommunityUrl().ToString() + ">" : "<https://steamcommunity.com/profiles/0>";
|
||||||
string targetcommunityUrl = target != null ? "<" + new SteamID(target.SteamID).ToCommunityUrl().ToString() + ">" : "<https://steamcommunity.com/profiles/0>";
|
string targetcommunityUrl = target != null ? "<" + new SteamID(target.SteamID).ToCommunityUrl().ToString() + ">" : "<https://steamcommunity.com/profiles/0>";
|
||||||
string callerName = caller != null ? caller.PlayerName : "Console";
|
string callerName = caller != null ? caller.PlayerName : "Console";
|
||||||
string targetName = target != null ? target.PlayerName : "Unknown";
|
string targetName = target != null ? target.PlayerName : localizer?["sa_unknown"] ?? "Unknown";
|
||||||
string targetSteamId = target != null ? new SteamID(target.SteamID).SteamId2.ToString() : "Unknown";
|
string targetSteamId = target != null ? new SteamID(target.SteamID).SteamId2.ToString() : localizer?["sa_unknown"] ?? "Unknown";
|
||||||
|
|
||||||
string time = duration != 0 ? ConvertMinutesToTime(duration) : "Permanent";
|
string time = duration != 0 ? ConvertMinutesToTime(duration) : localizer?["sa_permanent"] ?? "Permanent";
|
||||||
|
|
||||||
string[] fieldNames = ["Player:", "SteamID:", "Duration:", "Reason:", "Admin:"];
|
string[] fieldNames = [
|
||||||
|
localizer?["sa_player"] ?? "Player:",
|
||||||
|
localizer?["sa_steamid"] ?? "SteamID:",
|
||||||
|
localizer?["sa_duration"] ?? "Duration:",
|
||||||
|
localizer?["sa_reason"] ?? "Reason:",
|
||||||
|
localizer?["sa_admin"] ?? "Admin:"];
|
||||||
string[] fieldValues = [$"[{targetName}]({targetcommunityUrl})", targetSteamId, time, reason, $"[{callerName}]({callercommunityUrl})"];
|
string[] fieldValues = [$"[{targetName}]({targetcommunityUrl})", targetSteamId, time, reason, $"[{callerName}]({callercommunityUrl})"];
|
||||||
bool[] inlineFlags = [true, true, true, false, false];
|
bool[] inlineFlags = [true, true, true, false, false];
|
||||||
|
|
||||||
string? hostname = ConVar.Find("hostname")!.StringValue ?? CS2_SimpleAdmin._localizer?["sa_unknown"] ?? "Unknown";
|
string? hostname = ConVar.Find("hostname")!.StringValue ?? localizer?["sa_unknown"] ?? "Unknown";
|
||||||
|
|
||||||
var embed = new EmbedBuilder
|
var embed = new EmbedBuilder
|
||||||
{
|
{
|
||||||
Title = penalty switch
|
Title = penalty switch
|
||||||
{
|
{
|
||||||
PenaltyType.Ban => "Ban registrered",
|
PenaltyType.Ban => localizer?["sa_discord_penalty_ban"] ?? "Ban registrered",
|
||||||
PenaltyType.Mute => "Mute registrered",
|
PenaltyType.Mute => localizer?["sa_discord_penalty_mute"] ?? "Mute registrered",
|
||||||
PenaltyType.Gag => "Gag registrered",
|
PenaltyType.Gag => localizer?["sa_discord_penalty_gag"] ?? "Gag registrered",
|
||||||
PenaltyType.Silence => "Silence registrered",
|
PenaltyType.Silence => localizer?["sa_discord_penalty_silence"] ?? "Silence registrered",
|
||||||
_ => "Unknown penalty registrered",
|
_ => localizer?["sa_discord_penalty_unknown"] ?? "Unknown registrered",
|
||||||
},
|
},
|
||||||
|
|
||||||
Color = penalty switch
|
Color = penalty switch
|
||||||
|
|||||||
13
lang/ar.json
13
lang/ar.json
@@ -2,6 +2,19 @@
|
|||||||
"sa_prefix": "{lightred}[SA] {default}",
|
"sa_prefix": "{lightred}[SA] {default}",
|
||||||
"sa_unknown": "مجهول",
|
"sa_unknown": "مجهول",
|
||||||
|
|
||||||
|
"sa_player": "اللاعب",
|
||||||
|
"sa_steamid": "معرف البخار",
|
||||||
|
"sa_duration": "المدة",
|
||||||
|
"sa_reason": "السبب",
|
||||||
|
"sa_admin": "المشرف",
|
||||||
|
"sa_permanent": "دائم",
|
||||||
|
|
||||||
|
"sa_discord_penalty_ban": "الحظر مسجل",
|
||||||
|
"sa_discord_penalty_mute": "الكتم مسجل",
|
||||||
|
"sa_discord_penalty_gag": "الصمت مسجل",
|
||||||
|
"sa_discord_penalty_silence": "الصمت مسجل",
|
||||||
|
"sa_discord_penalty_unknown": "غير معروف مسجل",
|
||||||
|
|
||||||
"sa_player_ban_message_time": "تم حظرك لمدة {lightred}{0}{default} لمدة {lightred}{1}{default} دقيقة من قبل {lightred}{2}{default}!",
|
"sa_player_ban_message_time": "تم حظرك لمدة {lightred}{0}{default} لمدة {lightred}{1}{default} دقيقة من قبل {lightred}{2}{default}!",
|
||||||
"sa_player_ban_message_perm": "تم حظرك بشكل دائم لمدة {lightred}{0}{default} من قبل {lightred}{1}{default}!",
|
"sa_player_ban_message_perm": "تم حظرك بشكل دائم لمدة {lightred}{0}{default} من قبل {lightred}{1}{default}!",
|
||||||
"sa_player_kick_message": "تم طردك لمدة {lightred}{0}{default} من قبل {lightred}{1}{default}!",
|
"sa_player_kick_message": "تم طردك لمدة {lightred}{0}{default} من قبل {lightred}{1}{default}!",
|
||||||
|
|||||||
13
lang/en.json
13
lang/en.json
@@ -2,6 +2,19 @@
|
|||||||
"sa_prefix": "{lightred}[SA] {default}",
|
"sa_prefix": "{lightred}[SA] {default}",
|
||||||
"sa_unknown": "Unknown",
|
"sa_unknown": "Unknown",
|
||||||
|
|
||||||
|
"sa_player": "Player",
|
||||||
|
"sa_steamid": "SteamID",
|
||||||
|
"sa_duration": "Duration",
|
||||||
|
"sa_reason": "Reason",
|
||||||
|
"sa_admin": "Admin",
|
||||||
|
"sa_permanent": "Permanent",
|
||||||
|
|
||||||
|
"sa_discord_penalty_ban": "Ban registrered",
|
||||||
|
"sa_discord_penalty_mute": "Mute registrered",
|
||||||
|
"sa_discord_penalty_gag": "Gag registrered",
|
||||||
|
"sa_discord_penalty_silence": "Silence registrered",
|
||||||
|
"sa_discord_penalty_unknown": "Unknown registrered",
|
||||||
|
|
||||||
"sa_player_ban_message_time": "You have been banned for {lightred}{0}{default} for {lightred}{1}{default} minutes by {lightred}{2}{default}!",
|
"sa_player_ban_message_time": "You have been banned for {lightred}{0}{default} for {lightred}{1}{default} minutes by {lightred}{2}{default}!",
|
||||||
"sa_player_ban_message_perm": "You have been banned permanently for {lightred}{0}{default} by {lightred}{1}{default}!",
|
"sa_player_ban_message_perm": "You have been banned permanently for {lightred}{0}{default} by {lightred}{1}{default}!",
|
||||||
"sa_player_kick_message": "You have been kicked for {lightred}{0}{default} by {lightred}{1}{default}!",
|
"sa_player_kick_message": "You have been kicked for {lightred}{0}{default} by {lightred}{1}{default}!",
|
||||||
|
|||||||
13
lang/es.json
13
lang/es.json
@@ -2,6 +2,19 @@
|
|||||||
"sa_prefix": "{lightred}[SA] {default}",
|
"sa_prefix": "{lightred}[SA] {default}",
|
||||||
"sa_unknown": "Desconocido",
|
"sa_unknown": "Desconocido",
|
||||||
|
|
||||||
|
"sa_player": "Jugador",
|
||||||
|
"sa_steamid": "ID de Steam",
|
||||||
|
"sa_duration": "Duración",
|
||||||
|
"sa_reason": "Motivo",
|
||||||
|
"sa_admin": "Admin",
|
||||||
|
"sa_permanent": "Permanente",
|
||||||
|
|
||||||
|
"sa_discord_penalty_ban": "Ban registrado",
|
||||||
|
"sa_discord_penalty_mute": "Silencio registrado",
|
||||||
|
"sa_discord_penalty_gag": "Mordaza registrada",
|
||||||
|
"sa_discord_penalty_silence": "Silencio registrado",
|
||||||
|
"sa_discord_penalty_unknown": "Registro desconocido",
|
||||||
|
|
||||||
"sa_player_ban_message_time": "Has sido baneado por {lightred}{0}{default} durante {lightred}{1}{default} minutos por {lightred}{2}{default}!",
|
"sa_player_ban_message_time": "Has sido baneado por {lightred}{0}{default} durante {lightred}{1}{default} minutos por {lightred}{2}{default}!",
|
||||||
"sa_player_ban_message_perm": "Has sido baneado permanentemente por {lightred}{0}{default} por {lightred}{1}{default}!",
|
"sa_player_ban_message_perm": "Has sido baneado permanentemente por {lightred}{0}{default} por {lightred}{1}{default}!",
|
||||||
"sa_player_kick_message": "Has sido expulsado por {lightred}{0}{default} durante {lightred}{1}{default}!",
|
"sa_player_kick_message": "Has sido expulsado por {lightred}{0}{default} durante {lightred}{1}{default}!",
|
||||||
|
|||||||
13
lang/fa.json
13
lang/fa.json
@@ -2,6 +2,19 @@
|
|||||||
"sa_prefix": "{lightred}[SA] {default}",
|
"sa_prefix": "{lightred}[SA] {default}",
|
||||||
"sa_unknown": "ناشناخته",
|
"sa_unknown": "ناشناخته",
|
||||||
|
|
||||||
|
"sa_player": "بازیکن",
|
||||||
|
"sa_steamid": "شناسه استیم",
|
||||||
|
"sa_duration": "مدت زمان",
|
||||||
|
"sa_reason": "دلیل",
|
||||||
|
"sa_admin": "مدیر",
|
||||||
|
"sa_permanent": "دائمی",
|
||||||
|
|
||||||
|
"sa_discord_penalty_ban": "بن انجام شده",
|
||||||
|
"sa_discord_penalty_mute": "سکوت انجام شده",
|
||||||
|
"sa_discord_penalty_gag": "بند زدن انجام شده",
|
||||||
|
"sa_discord_penalty_silence": "سکوت انجام شده",
|
||||||
|
"sa_discord_penalty_unknown": "ناشناخته انجام شده",
|
||||||
|
|
||||||
"sa_player_ban_message_time": "شما توسط {lightred}{2}{default} برای {lightred}{1}{default} دقیقه به دلیل {lightred}{0}{default} مسدود شدهاید!",
|
"sa_player_ban_message_time": "شما توسط {lightred}{2}{default} برای {lightred}{1}{default} دقیقه به دلیل {lightred}{0}{default} مسدود شدهاید!",
|
||||||
"sa_player_ban_message_perm": "شما توسط {lightred}{1}{default} به دلیل {lightred}{0}{default} برای همیشه مسدود شدهاید!",
|
"sa_player_ban_message_perm": "شما توسط {lightred}{1}{default} به دلیل {lightred}{0}{default} برای همیشه مسدود شدهاید!",
|
||||||
"sa_player_kick_message": "شما توسط {lightred}{1}{default} به دلیل {lightred}{0}{default} اخراج شدهاید!",
|
"sa_player_kick_message": "شما توسط {lightred}{1}{default} به دلیل {lightred}{0}{default} اخراج شدهاید!",
|
||||||
|
|||||||
13
lang/fr.json
13
lang/fr.json
@@ -2,6 +2,19 @@
|
|||||||
"sa_prefix": "{lightred}[SA] {default}",
|
"sa_prefix": "{lightred}[SA] {default}",
|
||||||
"sa_unknown": "Inconnu",
|
"sa_unknown": "Inconnu",
|
||||||
|
|
||||||
|
"sa_player": "Joueur",
|
||||||
|
"sa_steamid": "ID Steam",
|
||||||
|
"sa_duration": "Durée",
|
||||||
|
"sa_reason": "Raison",
|
||||||
|
"sa_admin": "Admin",
|
||||||
|
"sa_permanent": "Permanent",
|
||||||
|
|
||||||
|
"sa_discord_penalty_ban": "Bannissement enregistré",
|
||||||
|
"sa_discord_penalty_mute": "Mute enregistré",
|
||||||
|
"sa_discord_penalty_gag": "Gag enregistré",
|
||||||
|
"sa_discord_penalty_silence": "Silence enregistré",
|
||||||
|
"sa_discord_penalty_unknown": "Inconnu enregistré",
|
||||||
|
|
||||||
"sa_player_ban_message_time": "Vous avez été banni pour {lightred}{0}{default} pendant {lightred}{1}{default} minutes par {lightred}{2}{default}!",
|
"sa_player_ban_message_time": "Vous avez été banni pour {lightred}{0}{default} pendant {lightred}{1}{default} minutes par {lightred}{2}{default}!",
|
||||||
"sa_player_ban_message_perm": "Vous avez été banni définitivement pour {lightred}{0}{default} par {lightred}{1}{default}!",
|
"sa_player_ban_message_perm": "Vous avez été banni définitivement pour {lightred}{0}{default} par {lightred}{1}{default}!",
|
||||||
"sa_player_kick_message": "Vous avez été expulsé pour {lightred}{0}{default} par {lightred}{1}{default}!",
|
"sa_player_kick_message": "Vous avez été expulsé pour {lightred}{0}{default} par {lightred}{1}{default}!",
|
||||||
|
|||||||
13
lang/lv.json
13
lang/lv.json
@@ -2,6 +2,19 @@
|
|||||||
"sa_prefix": "{lightred}[SA] {default}",
|
"sa_prefix": "{lightred}[SA] {default}",
|
||||||
"sa_unknown": "Nezināms",
|
"sa_unknown": "Nezināms",
|
||||||
|
|
||||||
|
"sa_player": "Spēlētājs",
|
||||||
|
"sa_steamid": "Steam ID",
|
||||||
|
"sa_duration": "Ilgums",
|
||||||
|
"sa_reason": "Iemesls",
|
||||||
|
"sa_admin": "Admins",
|
||||||
|
"sa_permanent": "Pastāvīgs",
|
||||||
|
|
||||||
|
"sa_discord_penalty_ban": "Bans reģistrēts",
|
||||||
|
"sa_discord_penalty_mute": "Mute reģistrēts",
|
||||||
|
"sa_discord_penalty_gag": "Gag reģistrēts",
|
||||||
|
"sa_discord_penalty_silence": "Klusums reģistrēts",
|
||||||
|
"sa_discord_penalty_unknown": "Nezināms reģistrēts",
|
||||||
|
|
||||||
"sa_player_ban_message_time": "Tu esi nobanots uz {lightred}{0}{default} uz {lightred}{1}{default} minūtēm, iemesls: {lightred}{2}{default}!",
|
"sa_player_ban_message_time": "Tu esi nobanots uz {lightred}{0}{default} uz {lightred}{1}{default} minūtēm, iemesls: {lightred}{2}{default}!",
|
||||||
"sa_player_ban_message_perm": "Tevis bans ir uz mūžu, iemesls: {lightred}{0}{default}, Admins: {lightred}{1}{default}!",
|
"sa_player_ban_message_perm": "Tevis bans ir uz mūžu, iemesls: {lightred}{0}{default}, Admins: {lightred}{1}{default}!",
|
||||||
"sa_player_kick_message": "Tu esi izmests, iemesls: {lightred}{0}{default}, Admins: {lightred}{1}{default}!",
|
"sa_player_kick_message": "Tu esi izmests, iemesls: {lightred}{0}{default}, Admins: {lightred}{1}{default}!",
|
||||||
|
|||||||
13
lang/pl.json
13
lang/pl.json
@@ -2,6 +2,19 @@
|
|||||||
"sa_prefix": "{lightred}[SA] {default}",
|
"sa_prefix": "{lightred}[SA] {default}",
|
||||||
"sa_unknown": "Brak",
|
"sa_unknown": "Brak",
|
||||||
|
|
||||||
|
"sa_player": "Gracz",
|
||||||
|
"sa_steamid": "SteamID",
|
||||||
|
"sa_duration": "Czas trwania",
|
||||||
|
"sa_reason": "Powód",
|
||||||
|
"sa_admin": "Administrator",
|
||||||
|
"sa_permanent": "Na zawsze",
|
||||||
|
|
||||||
|
"sa_discord_penalty_ban": "Nowy ban",
|
||||||
|
"sa_discord_penalty_mute": "Nowe wyciszenie",
|
||||||
|
"sa_discord_penalty_gag": "Nowe zakneblowanie",
|
||||||
|
"sa_discord_penalty_silence": "Nowe uciszenie",
|
||||||
|
"sa_discord_penalty_unknown": "Nowa nieznana blokada",
|
||||||
|
|
||||||
"sa_player_ban_message_time": "Zostałeś zbanowany za {lightred}{0}{default} na {lightred}{1}{default} minut przez {lightred}{2}{default}!",
|
"sa_player_ban_message_time": "Zostałeś zbanowany za {lightred}{0}{default} na {lightred}{1}{default} minut przez {lightred}{2}{default}!",
|
||||||
"sa_player_ban_message_perm": "Zostałeś zbanowany na zawsze za {lightred}{0}{default} przez {lightred}{1}{default}!",
|
"sa_player_ban_message_perm": "Zostałeś zbanowany na zawsze za {lightred}{0}{default} przez {lightred}{1}{default}!",
|
||||||
"sa_player_kick_message": "Zostałeś wyrzucony za {lightred}{0}{default} przez {lightred}{1}{default}!",
|
"sa_player_kick_message": "Zostałeś wyrzucony za {lightred}{0}{default} przez {lightred}{1}{default}!",
|
||||||
|
|||||||
@@ -2,6 +2,19 @@
|
|||||||
"sa_prefix": "{lightred}[SA] {default}",
|
"sa_prefix": "{lightred}[SA] {default}",
|
||||||
"sa_unknown": "Desconhecido",
|
"sa_unknown": "Desconhecido",
|
||||||
|
|
||||||
|
"sa_player": "Jogador",
|
||||||
|
"sa_steamid": "SteamID",
|
||||||
|
"sa_duration": "Duração",
|
||||||
|
"sa_reason": "Motivo",
|
||||||
|
"sa_admin": "Admin",
|
||||||
|
"sa_permanent": "Permanente",
|
||||||
|
|
||||||
|
"sa_discord_penalty_ban": "Banimento registrado",
|
||||||
|
"sa_discord_penalty_mute": "Mute registrado",
|
||||||
|
"sa_discord_penalty_gag": "Gag registrado",
|
||||||
|
"sa_discord_penalty_silence": "Silêncio registrado",
|
||||||
|
"sa_discord_penalty_unknown": "Desconhecido registrado",
|
||||||
|
|
||||||
"sa_player_ban_message_time": "Você foi banido por {lightred}{0}{default} por {lightred}{1}{default} minutos por {lightred}{2}{default}!",
|
"sa_player_ban_message_time": "Você foi banido por {lightred}{0}{default} por {lightred}{1}{default} minutos por {lightred}{2}{default}!",
|
||||||
"sa_player_ban_message_perm": "Você foi banido permanentemente por {lightred}{0}{default} por {lightred}{1}{default}!",
|
"sa_player_ban_message_perm": "Você foi banido permanentemente por {lightred}{0}{default} por {lightred}{1}{default}!",
|
||||||
"sa_player_kick_message": "Você foi expulso por {lightred}{0}{default} por {lightred}{1}{default}!",
|
"sa_player_kick_message": "Você foi expulso por {lightred}{0}{default} por {lightred}{1}{default}!",
|
||||||
|
|||||||
13
lang/ru.json
13
lang/ru.json
@@ -2,6 +2,19 @@
|
|||||||
"sa_prefix": "{lightred}[SA] {default}",
|
"sa_prefix": "{lightred}[SA] {default}",
|
||||||
"sa_unknown": "Неизвестный",
|
"sa_unknown": "Неизвестный",
|
||||||
|
|
||||||
|
"sa_player": "Игрок",
|
||||||
|
"sa_steamid": "SteamID",
|
||||||
|
"sa_duration": "Продолжительность",
|
||||||
|
"sa_reason": "Причина",
|
||||||
|
"sa_admin": "Администратор",
|
||||||
|
"sa_permanent": "Постоянный",
|
||||||
|
|
||||||
|
"sa_discord_penalty_ban": "Бан зарегистрирован",
|
||||||
|
"sa_discord_penalty_mute": "Мут зарегистрирован",
|
||||||
|
"sa_discord_penalty_gag": "Запрет зарегистрирован",
|
||||||
|
"sa_discord_penalty_silence": "Молчание зарегистрировано",
|
||||||
|
"sa_discord_penalty_unknown": "Неизвестно зарегистрировано",
|
||||||
|
|
||||||
"sa_player_ban_message_time": "Вы были забанены по причине {lightred}{0}{default} на {lightred}{1}{default} минут(ы) администратором {lightred}{2}{default}!",
|
"sa_player_ban_message_time": "Вы были забанены по причине {lightred}{0}{default} на {lightred}{1}{default} минут(ы) администратором {lightred}{2}{default}!",
|
||||||
"sa_player_ban_message_perm": "Вас забанили навсегда по причине {lightred}{0}{default} администратором {lightred}{1}{default}!",
|
"sa_player_ban_message_perm": "Вас забанили навсегда по причине {lightred}{0}{default} администратором {lightred}{1}{default}!",
|
||||||
"sa_player_kick_message": "Вы были выгнаны {lightred}{0}{default} администратором {lightred}{1}{default}!",
|
"sa_player_kick_message": "Вы были выгнаны {lightred}{0}{default} администратором {lightred}{1}{default}!",
|
||||||
|
|||||||
13
lang/tr.json
13
lang/tr.json
@@ -2,6 +2,19 @@
|
|||||||
"sa_prefix": "{lightred}[SA] {default}",
|
"sa_prefix": "{lightred}[SA] {default}",
|
||||||
"sa_unknown": "Bilinmeyen",
|
"sa_unknown": "Bilinmeyen",
|
||||||
|
|
||||||
|
"sa_player": "Oyuncu",
|
||||||
|
"sa_steamid": "SteamID",
|
||||||
|
"sa_duration": "Süre",
|
||||||
|
"sa_reason": "Neden",
|
||||||
|
"sa_admin": "Yönetici",
|
||||||
|
"sa_permanent": "Kalıcı",
|
||||||
|
|
||||||
|
"sa_discord_penalty_ban": "Yasak kaydedildi",
|
||||||
|
"sa_discord_penalty_mute": "Susturma kaydedildi",
|
||||||
|
"sa_discord_penalty_gag": "Susturma kaydedildi",
|
||||||
|
"sa_discord_penalty_silence": "Sessizlik kaydedildi",
|
||||||
|
"sa_discord_penalty_unknown": "Bilinmeyen kaydedildi",
|
||||||
|
|
||||||
"sa_player_ban_message_time": "Senaryo nedeniyle {lightred}{0}{default} dakika boyunca {lightred}{1}{default} tarafından yasaklandınız!",
|
"sa_player_ban_message_time": "Senaryo nedeniyle {lightred}{0}{default} dakika boyunca {lightred}{1}{default} tarafından yasaklandınız!",
|
||||||
"sa_player_ban_message_perm": "Senaryo nedeniyle kalıcı olarak {lightred}{0}{default} tarafından yasaklandınız!",
|
"sa_player_ban_message_perm": "Senaryo nedeniyle kalıcı olarak {lightred}{0}{default} tarafından yasaklandınız!",
|
||||||
"sa_player_kick_message": "Senaryo nedeniyle {lightred}{0}{default} tarafından atıldınız!",
|
"sa_player_kick_message": "Senaryo nedeniyle {lightred}{0}{default} tarafından atıldınız!",
|
||||||
|
|||||||
@@ -2,6 +2,19 @@
|
|||||||
"sa_prefix": "{lightred}[SA] {default}",
|
"sa_prefix": "{lightred}[SA] {default}",
|
||||||
"sa_unknown": "未知",
|
"sa_unknown": "未知",
|
||||||
|
|
||||||
|
"sa_player": "玩家",
|
||||||
|
"sa_steamid": "SteamID",
|
||||||
|
"sa_duration": "持续时间",
|
||||||
|
"sa_reason": "原因",
|
||||||
|
"sa_admin": "管理员",
|
||||||
|
"sa_permanent": "永久",
|
||||||
|
|
||||||
|
"sa_discord_penalty_ban": "封禁已记录",
|
||||||
|
"sa_discord_penalty_mute": "禁言已记录",
|
||||||
|
"sa_discord_penalty_gag": "禁言已记录",
|
||||||
|
"sa_discord_penalty_silence": "禁声已记录",
|
||||||
|
"sa_discord_penalty_unknown": "未知已记录",
|
||||||
|
|
||||||
"sa_player_ban_message_time": "你因为{lightred}{0}{default}的原因被{lightred}{1}{default}禁止{lightred}{2}{default}分钟!",
|
"sa_player_ban_message_time": "你因为{lightred}{0}{default}的原因被{lightred}{1}{default}禁止{lightred}{2}{default}分钟!",
|
||||||
"sa_player_ban_message_perm": "你因为{lightred}{0}{default}的原因被{lightred}{1}{default}永久禁止!",
|
"sa_player_ban_message_perm": "你因为{lightred}{0}{default}的原因被{lightred}{1}{default}永久禁止!",
|
||||||
"sa_player_kick_message": "你因为{lightred}{0}{default}的原因被{lightred}{1}{default}踢出!",
|
"sa_player_kick_message": "你因为{lightred}{0}{default}的原因被{lightred}{1}{default}踢出!",
|
||||||
|
|||||||
Reference in New Issue
Block a user