Warns - first

-WarnManager
- css_warn
- Warn config
- Warn languages

~ Warn menu
~ Warn table
~ *css_unwarn
~ css_addwarn
This commit is contained in:
Dawid Bepierszcz
2024-08-11 22:54:54 +02:00
parent c4cb308147
commit 0674b7e492
19 changed files with 870 additions and 416 deletions

View File

@@ -67,6 +67,16 @@ namespace CS2_SimpleAdmin
[JsonPropertyName("DiscordPenaltySilenceSettings")]
public DiscordPenaltySetting[] DiscordPenaltySilenceSettings { get; set; } =
[
new DiscordPenaltySetting { Name = "Color", Value = "" },
new DiscordPenaltySetting { Name = "Webhook", Value = "" },
new DiscordPenaltySetting { Name = "ThumbnailUrl", Value = "" },
new DiscordPenaltySetting { Name = "ImageUrl", Value = "" },
new DiscordPenaltySetting { Name = "Footer", Value = "" },
];
[JsonPropertyName("DiscordPenaltyWarnSettings")]
public DiscordPenaltySetting[] DiscordPenaltyWarnSettings { get; set; } =
[
new DiscordPenaltySetting { Name = "Color", Value = "" },
new DiscordPenaltySetting { Name = "Webhook", Value = "" },
@@ -157,7 +167,7 @@ namespace CS2_SimpleAdmin
public class CS2_SimpleAdminConfig : BasePluginConfig
{
[JsonPropertyName("ConfigVersion")] public override int Version { get; set; } = 17;
[JsonPropertyName("ConfigVersion")] public override int Version { get; set; } = 18;
[JsonPropertyName("DatabaseHost")]
public string DatabaseHost { get; set; } = "";
@@ -188,7 +198,16 @@ namespace CS2_SimpleAdmin
[JsonPropertyName("KickTime")]
public int KickTime { get; set; } = 5;
[JsonPropertyName("WarnThreshold")]
public Dictionary<int, string> WarnThreshold { get; set; } = new()
{
{ 1, "" },
{ 2, "" },
{ 3, "" },
{ 4, "css_ban USERID 120 \"4/4 Warn\"" },
};
[JsonPropertyName("DisableDangerousCommands")]
public bool DisableDangerousCommands { get; set; } = true;
@@ -200,6 +219,7 @@ namespace CS2_SimpleAdmin
[JsonPropertyName("MaxBanDuration")]
public int MaxBanDuration { get; set; } = 60 * 24 * 7;
[JsonPropertyName("MultiServerMode")]
public bool MultiServerMode { get; set; } = true;