1. 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
     
  2. Wulf

    Wulf Community Admin

    The only way to remove all via commands right now is by deleting the entire group.
     
  3. Alright thanks Wulf.
     
  4. Vote for wildcard support!
     
  5. 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}");
            }
        }
    }
    4. Change "ENTER_GROUP_NAME" for group which you want clear
    5. Save file, at will remove all users once you will save file and it will load on server

    P.S.:
    1. Do not submit resources, because it is useless for most users
    2. 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
    3. @Wolf, if you can - fix my english troubles xD
     
    Last edited by a moderator: Aug 16, 2018
  6. Wulf

    Wulf Community Admin

    permission.RevokeUserGroup is what the command "oxide.usergroup remove" uses, so that logic is flawed. ;)

    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.
     
  7. Yes, but sometimes, it doesnot work. Idk reason, saw sources, but can't understood where is trouble xD So, to do'not have troubles used command.
     
  8. Wulf

    Wulf Community Admin

    The reason would be what I mentioned above. It isn't not working, it just isn't showing a message when the user isn't actually in the group so there's nothing to remove. The method works the same if you go through the command or not, you just don't get the extra checking if they are in the group or not and all the extra messages.
     
  9. Yeah, i read your message, will not arguere :)
     
  10. faster to do what wulf said in post 2
    1. Do not submit resources, because it is useless for most users
    2. 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
  11. 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.
     
  12. Permissions Manager has a button for this ^. :)