Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
# Conflicts:
#	AdminTools/AdminTools.csproj
  • Loading branch information
joker-119 committed Jan 11, 2023
2 parents 2785a76 + 9cb8982 commit ff7d91e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions AdminTools/Commands/Kick/Kick.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,12 @@ protected override bool ExecuteParent(ArraySegment<string> 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;
Expand Down

0 comments on commit ff7d91e

Please sign in to comment.