【UPDATE 1.7.4b】

**🆕  What's new and what's changed:**
- Added support for MySQL SSL (DatabaseSSlMode in config)
This commit is contained in:
Dawid Bepierszcz
2025-02-19 12:27:24 +01:00
parent 2d77e86d59
commit 708ae6cb90
4 changed files with 22 additions and 2 deletions

View File

@@ -19,7 +19,7 @@ public partial class CS2_SimpleAdmin : BasePlugin, IPluginConfig<CS2_SimpleAdmin
public override string ModuleName => "CS2-SimpleAdmin" + (Helper.IsDebugBuild ? " (DEBUG)" : " (RELEASE)");
public override string ModuleDescription => "Simple admin plugin for Counter-Strike 2 :)";
public override string ModuleAuthor => "daffyy & Dliix66";
public override string ModuleVersion => "1.7.4a";
public override string ModuleVersion => "1.7.4b";
public override void Load(bool hotReload)
{
@@ -87,6 +87,7 @@ public partial class CS2_SimpleAdmin : BasePlugin, IPluginConfig<CS2_SimpleAdmin
UserID = config.DatabaseUser,
Password = config.DatabasePassword,
Port = (uint)config.DatabasePort,
SslMode = Enum.TryParse(config.DatabaseSSlMode, true, out MySqlSslMode sslMode) ? sslMode : MySqlSslMode.Preferred,
Pooling = true,
MinimumPoolSize = 0,
MaximumPoolSize = 640,

View File

@@ -250,6 +250,9 @@ public class CS2_SimpleAdminConfig : BasePluginConfig
[JsonPropertyName("DatabaseName")]
public string DatabaseName { get; set; } = "";
[JsonPropertyName("DatabaseSSlMode")]
public string DatabaseSSlMode { get; set; } = "preferred";
[JsonPropertyName("OtherSettings")]
public OtherSettings OtherSettings { get; set; } = new();

View File

@@ -1 +1 @@
1.7.4a
1.7.4b

View File

@@ -0,0 +1,16 @@
"Config"
{
// Доступные переменные: {userid}, {steamid}, {name}
"punish_type" "1" // 0 - kick, 1 - command(punish_command)
"punish_command" "css_addban {steamid} 0 [AC] Cheats detected #5" // Command to execute when a player is detected with a DLL
// Команда для выполнения, когда игрок обнаружен с DLL
"chat_message" "" // Сообщение в чат при обнаружении DLL для всех игроков, пусто - не отправлять
// Chat message when a player is detected with a DLL for all players, empty - dont send
"logs" "1" // Логировать в файл наказания? 0 - нет, 1 - да
// Log punishments to file? 0 - no, 1 - yes
"interval" "120" // Интервал проверки игроков на наличие DLL в секундах
// Interval to check players for DLL in seconds
}