ULX: Disable ability to add Superadmin to Owner

This is definitely something i’ll need to add. Does anyone know how? I’ve tried this already.

ulx groupallow superadmin "ulx adduser" "!%owner"

If you’re trying to prevent superadmins from making themselves owner, do “!%superadmin”

It’s also generally good practice to set the “groupcantarget” stuff like this:

ulx setgroupcantarget superadmin !%owner
ulx setgroupcantarget admin !%superadmin

Targeting won’t work here because the second argument for “ulx adduser” doesn’t target a group or player, it’s just a string that specifies a group. The solution would be to restrict the group argument to only allow specific strings:

ulx groupallow superadmin "ulx adduser" "* <operator,admin,donator>"

–assuming that these are the groups you want to allow the admin to add people to. You don’t want to specify the user group here, that’s done by ‘ulx removeuser’. Also note that * means that they can target everyone, but it still will obey their groups cantarget, which if set up properly, still means they can’t target superadmin.

(Fun fact! If, for example, you want to have users be able to use ‘ulx slap’ on anyone, you can set the restriction string to "*" -- the will tell it to ignore the can_target applied to the user group, which by default prevents them from targeting anyone except other users)

Additionally, you can set this up within XGUI by going to Groups tab->superadmin->Manage Permissions->ulx ban, then edit the group string restrictions on the right side. See this screenshot as an example using ulx rcon: http://img401.imageshack.us/img401/5134/rconlimitations.png

Thanks, but I’m unsure on how to make the code work. Superadmin can still add players to owner if they want.

If you use AWarn, have a way to detect when admins use the command with the argument owner and warn them

I know. I have it, its a very good feature. Anyway, I’m still kind of stumped on this. I’m going to give it another go.

My Superadmin rank can still add themselves to Owner. I’ve tried using the whitelist and also this;

 ulx setgroupcantarget superadmin "!%owner"

Megiddo posted this on http://forums.ulyssesmod.net/index.php?topic=5206.0 so it should work,
I’m not sure why it doesn’t though.

To clarify, whitelist the name of all the groups <= superadmin