diff --git a/CS2-SimpleAdmin.cs b/CS2-SimpleAdmin.cs index c656057..dbcb460 100644 --- a/CS2-SimpleAdmin.cs +++ b/CS2-SimpleAdmin.cs @@ -11,7 +11,7 @@ using System.Collections.Concurrent; namespace CS2_SimpleAdmin; -[MinimumApiVersion(225)] +[MinimumApiVersion(228)] public partial class CS2_SimpleAdmin : BasePlugin, IPluginConfig { public static CS2_SimpleAdmin Instance { get; private set; } = new(); @@ -37,7 +37,7 @@ public partial class CS2_SimpleAdmin : BasePlugin, IPluginConfig "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.4.4a"; + public override string ModuleVersion => "1.4.4b"; public CS2_SimpleAdminConfig Config { get; set; } = new(); @@ -63,6 +63,11 @@ public partial class CS2_SimpleAdmin : BasePlugin, IPluginConfig ReloadAdmins(null)); + } public void OnConfigParsed(CS2_SimpleAdminConfig config) { diff --git a/Commands/basecommands.cs b/Commands/basecommands.cs index c0c5d66..a458869 100644 --- a/Commands/basecommands.cs +++ b/Commands/basecommands.cs @@ -321,7 +321,7 @@ namespace CS2_SimpleAdmin await Server.NextFrameAsync(() => { - AddTimer(0.2f, () => + AddTimer(0.1f, () => { AdminManager.LoadAdminData(ModuleDirectory + "/data/admins.json"); AdminManager.LoadAdminGroups(ModuleDirectory + "/data/groups.json"); diff --git a/Database/Migrations/008_OnlineTimeInPenalties.sql b/Database/Migrations/008_OnlineTimeInPenalties.sql new file mode 100644 index 0000000..d22934f --- /dev/null +++ b/Database/Migrations/008_OnlineTimeInPenalties.sql @@ -0,0 +1 @@ +ALTER TABLE `sa_mutes` ADD `passed` INT NULL AFTER `duration`; diff --git a/Events.cs b/Events.cs index fcef94d..90ce1eb 100644 --- a/Events.cs +++ b/Events.cs @@ -20,7 +20,7 @@ public partial class CS2_SimpleAdmin AddCommandListener("say", OnCommandSay); AddCommandListener("say_team", OnCommandTeamSay); } - + [GameEventHandler] public HookResult OnClientDisconnect(EventPlayerDisconnect @event, GameEventInfo info) { @@ -331,15 +331,6 @@ public partial class CS2_SimpleAdmin Logger.LogWarning($"Unable to make metrics call: {ex.Message}"); } } - - //await _adminManager.GiveAllGroupsFlags(); - //await _adminManager.GiveAllFlags(); - - await Server.NextFrameAsync(() => - { - ReloadAdmins(null); - }); - }); }, CounterStrikeSharp.API.Modules.Timers.TimerFlags.STOP_ON_MAPCHANGE); diff --git a/README.md b/README.md index ef83c9d..757ea91 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ Manage your Counter-Strike 2 server by simple commands :) ```js - css_addadmin [time in minutes] - Add admin by steamid // @css/root - css_deladmin - Delete admin by steamid // @css/root -- css_reladmin - Reload sql admins // @css/root +- css_reloadadmins - Reload sql admins // @css/root - css_hide - Hide admin on scoreboard and commands action // @css/kick - css_admin - Display all admin commands // @css/generic - css_who <#userid or name> - Display informations about player // @css/generic @@ -62,7 +62,7 @@ Manage your Counter-Strike 2 server by simple commands :) ``` ### Requirements -- [CounterStrikeSharp](https://github.com/roflmuffin/CounterStrikeSharp/) **tested on v201** +- [CounterStrikeSharp](https://github.com/roflmuffin/CounterStrikeSharp/) **tested on 228** - MySQL **tested on MySQL (MariaDB) Server version: 10.11.4-MariaDB-1~deb12u1 Debian 12** diff --git a/VERSION b/VERSION index b1109f7..8e31548 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.4.4a \ No newline at end of file +1.4.4b \ No newline at end of file