I tried removing everyone from a group using the below command but it said it found multiple users. These users names start with an asterisk. I need to remove everyone is there anyway around this?
oxide.usergroup remove * groupname
Solved Removing everyone from a group?
Discussion in 'Rust Discussion' started by nimdasys, Aug 16, 2018.
-
Wulf Community Admin
The only way to remove all via commands right now is by deleting the entire group.
-
Alright thanks Wulf.
-
Vote for wildcard support!
-
1. Create in Plugin folder file with name RemoveUsers.cs
2. Open it in Notepad++
3. Enter this in file
Code:namespace Oxide.Plugins { [Info("RemoveUsers", "Hougan", "0.0.1")] public class RemoveUsers : RustPlugin { private void OnServerInitialized() { string groupName = "ENTER_GROUP_NAME"; foreach (var check in permission.GetUsersInGroup(groupName)) Server.Command($"o.usergroup remove {check} {groupName}"); } } }
5. Save file, at will remove all users once you will save file and it will load on server
P.S.:
- Do not submit resources, because it is useless for most users
- Do not use permission.RevokeUserGroup because it sometimes does not work, and it can show the user an easier way to work with the group, so they can change commands for example move them from other groups
Last edited by a moderator: Aug 16, 2018 -
Wulf Community Admin
The only thing different that the commands do is check if the user is actually in that group first. You can do the same thing the commands do and use the methods directly without issues. -
-
Wulf Community Admin
-
-
- Do not submit resources, because it is useless for most users
- Do not use permission.RevokeUserGroup because it sometimes does not work, and it can show the user an easier way to work with the group, so they can change commands for example move them from other groups
Last edited by a moderator: Aug 16, 2018 -
Thanks HOUGAN_Y! I have to wipe a group of members every wipe so I think I will load that during wipe and then remove it after.
-
Permissions Manager has a button for this ^.