mirror of
https://github.com/daffyyyy/CS2-SimpleAdmin.git
synced 2026-03-10 16:34:40 +00:00
Compare commits
2 Commits
2d77e86d59
...
62b1987fde
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
62b1987fde | ||
|
|
708ae6cb90 |
@@ -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 ModuleName => "CS2-SimpleAdmin" + (Helper.IsDebugBuild ? " (DEBUG)" : " (RELEASE)");
|
||||||
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.7.4a";
|
public override string ModuleVersion => "1.7.4b";
|
||||||
|
|
||||||
public override void Load(bool hotReload)
|
public override void Load(bool hotReload)
|
||||||
{
|
{
|
||||||
@@ -87,6 +87,7 @@ public partial class CS2_SimpleAdmin : BasePlugin, IPluginConfig<CS2_SimpleAdmin
|
|||||||
UserID = config.DatabaseUser,
|
UserID = config.DatabaseUser,
|
||||||
Password = config.DatabasePassword,
|
Password = config.DatabasePassword,
|
||||||
Port = (uint)config.DatabasePort,
|
Port = (uint)config.DatabasePort,
|
||||||
|
SslMode = Enum.TryParse(config.DatabaseSSlMode, true, out MySqlSslMode sslMode) ? sslMode : MySqlSslMode.Preferred,
|
||||||
Pooling = true,
|
Pooling = true,
|
||||||
MinimumPoolSize = 0,
|
MinimumPoolSize = 0,
|
||||||
MaximumPoolSize = 640,
|
MaximumPoolSize = 640,
|
||||||
|
|||||||
@@ -250,6 +250,9 @@ public class CS2_SimpleAdminConfig : BasePluginConfig
|
|||||||
|
|
||||||
[JsonPropertyName("DatabaseName")]
|
[JsonPropertyName("DatabaseName")]
|
||||||
public string DatabaseName { get; set; } = "";
|
public string DatabaseName { get; set; } = "";
|
||||||
|
|
||||||
|
[JsonPropertyName("DatabaseSSlMode")]
|
||||||
|
public string DatabaseSSlMode { get; set; } = "preferred";
|
||||||
|
|
||||||
[JsonPropertyName("OtherSettings")]
|
[JsonPropertyName("OtherSettings")]
|
||||||
public OtherSettings OtherSettings { get; set; } = new();
|
public OtherSettings OtherSettings { get; set; } = new();
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
1.7.4a
|
1.7.4b
|
||||||
@@ -86,8 +86,15 @@ public sealed class AntiDLL_CS2_SimpleAdmin : BasePlugin, IPluginConfig<PluginCo
|
|||||||
_bannedPlayers.Remove(playerSlot);
|
_bannedPlayers.Remove(playerSlot);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnDetection(CCSPlayerController player, string eventName)
|
private void OnDetection(CCSPlayerController? player, string eventName)
|
||||||
{
|
{
|
||||||
|
if (player == null || !player.IsValid || player.IsBot) return;
|
||||||
|
if (player.Connected != PlayerConnectedState.PlayerConnected)
|
||||||
|
{
|
||||||
|
AddTimer(3.0f, () => OnDetection(player, eventName));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (!_bannedPlayers.Add(player.Slot))
|
if (!_bannedPlayers.Add(player.Slot))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
16
Modules/AntiDLL-CS2-SimpleAdmin/settings.ini
Normal file
16
Modules/AntiDLL-CS2-SimpleAdmin/settings.ini
Normal 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
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user