From 71d33d81a90c50edb1d1c157d47541dc6a77c378 Mon Sep 17 00:00:00 2001 From: Misaka_ZeroTwo Date: Sat, 21 May 2022 14:25:56 +0800 Subject: [PATCH 1/2] references --- AdminTools/AdminTools.csproj | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/AdminTools/AdminTools.csproj b/AdminTools/AdminTools.csproj index 0833c14..23ad0c2 100644 --- a/AdminTools/AdminTools.csproj +++ b/AdminTools/AdminTools.csproj @@ -38,12 +38,8 @@ ..\packages\EXILED.5.2.1\lib\net472\Assembly-CSharp-Publicized.dll - - ..\..\References\Assembly-CSharp-Publicized.dll - - - ..\..\References\Assembly-CSharp-firstpass.dll - + + ..\packages\EXILED.5.2.1\lib\net472\CommandSystem.Core.dll @@ -170,4 +166,4 @@ --> - \ No newline at end of file + From 915c51e80ebd7ea445bffd907f26855fd49fe8bd Mon Sep 17 00:00:00 2001 From: John Zha Date: Sat, 21 May 2022 14:35:33 +0800 Subject: [PATCH 2/2] integrate kick power --- AdminTools/Commands/Kick/Kick.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/AdminTools/Commands/Kick/Kick.cs b/AdminTools/Commands/Kick/Kick.cs index b818d20..6256635 100644 --- a/AdminTools/Commands/Kick/Kick.cs +++ b/AdminTools/Commands/Kick/Kick.cs @@ -42,6 +42,12 @@ protected override bool ExecuteParent(ArraySegment arguments, ICommandSe return false; } + if(ply.ReferenceHub.serverRoles.Group != null && ply.ReferenceHub.serverRoles.Group.RequiredKickPower > ((CommandSender)sender).KickPower) + { + response = $"You do not have permission to kick the specified player"; + return false; + } + ply.Kick(EventHandlers.FormatArguments(arguments, 1)); response = $"Player {ply.Nickname} has been kicked for \"{EventHandlers.FormatArguments(arguments, 1)}\""; return true;