Skip to content

Commit

Permalink
Allow Facepunch administrators to execute commands
Browse files Browse the repository at this point in the history
  • Loading branch information
features-not-bugs committed Jun 26, 2022
1 parent 3c86956 commit 8669019
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/AdminRestrictions/CommandRestrictor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,18 @@ bool IsCommandPermitted(ConsoleSystem.Arg arg)
}
}

// Allow Facepunch administrators to execute commands
var developers = Facepunch.Application.Manifest?.Administrators;
if (developers != null)
{
var steamIdString = arg.Connection.userid.ToString();
for (int i = 0; i < developers.Length; i++)
{
if (developers[i].UserId == steamIdString)
return true;
}
}

var steamId = arg.Connection.userid;

// Time to iterate over all the group configs in the configuration
Expand Down

0 comments on commit 8669019

Please sign in to comment.