File tree 2 files changed +5
-2
lines changed
2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ Allow players to automatically try and unlock locked code locks with their code.
11
11
12
12
- ` autocode.use ` - Allows use of this plugin.
13
13
- ` autocode.try ` - Allows auto-trying of user code on locked code locks.
14
+ - ` autocode.admin ` - Allows use of admin commands.
14
15
15
16
## Chat Commands
16
17
@@ -27,7 +28,7 @@ The same commands are also avalibale in a guest code version:
27
28
28
29
## Console Commands
29
30
30
- Only admins can use these .
31
+ Requires ` autocode.admin ` to use.
31
32
32
33
- ` autocode.resetlockout * ` - Removes all lock outs for all players.
33
34
- ` autocode.resetlockout playerSteamId_or_playerDisplayName ` - Removes lock out for the specified player.
Original file line number Diff line number Diff line change @@ -713,6 +713,7 @@ private static class Permissions
713
713
// Permissions.
714
714
public const string Use = "autocode.use" ;
715
715
public const string Try = "autocode.try" ;
716
+ public const string Admin = "autocode.admin" ;
716
717
717
718
/// <summary>
718
719
/// Register the permissions.
@@ -721,6 +722,7 @@ public static void Register(AutoCode plugin)
721
722
{
722
723
plugin . permission . RegisterPermission ( Use , plugin ) ;
723
724
plugin . permission . RegisterPermission ( Try , plugin ) ;
725
+ plugin . permission . RegisterPermission ( Admin , plugin ) ;
724
726
}
725
727
}
726
728
@@ -771,7 +773,7 @@ private bool HandleResetLockOut(ConsoleSystem.Arg arg)
771
773
BasePlayer player = arg . Player ( ) ;
772
774
773
775
// Not admin?
774
- if ( ! arg . IsAdmin )
776
+ if ( ! plugin . permission . UserHasPermission ( player . UserIDString , Permissions . Admin ) )
775
777
{
776
778
if ( plugin . config . Options . DisplayPermissionErrors )
777
779
{
You can’t perform that action at this time.
0 commit comments