Skip to content

Commit 2be9141

Browse files
committed
Fix permission revoke command not supporting wildcards
1 parent cd9d620 commit 2be9141

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/RustCommands.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,7 @@ private void RevokeCommand(IPlayer player, string command, string[] args)
408408
return;
409409
}
410410

411-
if (!permission.GroupHasPermission(name, perm))
411+
if (!perm.EndsWith("*") && !permission.GroupHasPermission(name, perm))
412412
{
413413
// TODO: Check if group is inheriting permission, mention
414414
player.Reply(string.Format(lang.GetMessage("GroupDoesNotHavePermission", this, player.Id), name, perm));
@@ -442,7 +442,7 @@ private void RevokeCommand(IPlayer player, string command, string[] args)
442442
permission.UpdateNickname(userId, name);
443443
}
444444

445-
if (!permission.UserHasPermission(userId, perm))
445+
if (!perm.EndsWith("*") && !permission.UserHasPermission(userId, perm))
446446
{
447447
// TODO: Check if user is inheriting permission, mention
448448
player.Reply(string.Format(lang.GetMessage("PlayerDoesNotHavePermission", this, player.Id), name, perm));

0 commit comments

Comments
 (0)