Author Topic: How to set up groupcantarget?  (Read 3284 times)

0 Members and 1 Guest are viewing this topic.

Offline Zeroi9

  • Newbie
  • *
  • Posts: 11
  • Karma: 0
How to set up groupcantarget?
« on: September 04, 2013, 12:02:26 PM »
Hi, I have these groups:
superadmin
headadmin
vipadmin
admin
vipmod
mod
donator
trusted
user

currently, all ranks have, cantarget: !%rankabove
like, admins have !%superadmin.

The issue is two things:
1. an admin were able to ban me, superadmin, from our server yesterday(just for testing).
2. physgunning:
admin is able to physgun vipadmin and headadmin (can target: !%admin)
vipadmin is not able to physgun admin or headadmin (can target:!%admin)
admin can ban, but not physgun, superadmin (can target: !%superadmin)

How I want it:
Superadmin targets *
vipadmin/admin targets everyone except vipadmins, admins, headadmin, superadmin
vipmod/mod targets everyone except vipmod, mod, vipadmin, admin, headadmin, superadmin

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: How to set up groupcantarget?
« Reply #1 on: September 04, 2013, 01:51:57 PM »
As it's difficult to tell exact details without seeing how your server sees it, please, go to your server console, run the command 'ulx debuginfo'.
The server console will reply where it placed a file.
Attach that file to your post here.
It would be best if you could have at least you connected, and one of the people that could ban  you.
And also, how did they ban you? Using "ulx ban", or console 'banid'?
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline LuaTenshi

  • Hero Member
  • *****
  • Posts: 545
  • Karma: 47
  • Just your ordinary moon angel!
    • Mirai.Red
Re: How to set up groupcantarget?
« Reply #2 on: September 04, 2013, 01:55:03 PM »
Hi, I have these groups:
superadmin
headadmin
vipadmin
admin
vipmod
mod
donator
trusted
user

...

Try this... admin can target: !%vipadmin | vipadmin can target: !%headadmin | headadmin: !%superadmin | superadmin can target: *
I cry every time I see that I am not a respected member of this community.

Offline Zeroi9

  • Newbie
  • *
  • Posts: 11
  • Karma: 0
Re: How to set up groupcantarget?
« Reply #3 on: September 04, 2013, 03:09:28 PM »
As it's difficult to tell exact details without seeing how your server sees it, please, go to your server console, run the command 'ulx debuginfo'.
The server console will reply where it placed a file.
Attach that file to your post here.
It would be best if you could have at least you connected, and one of the people that could ban  you.
And also, how did they ban you? Using "ulx ban", or console 'banid'?

I will ask how they banned me tomorrow, he was of rank "admin".
http://pastebin.com/gkrZb5ye

Try this... admin can target: !%vipadmin | vipadmin can target: !%headadmin | headadmin: !%superadmin | superadmin can target: *
I changed to this, I will have to wait until tomorrow so my admins and mods can try on eachother.

Thank you for your help.

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: How to set up groupcantarget?
« Reply #4 on: September 04, 2013, 07:03:05 PM »
That doesn't seem like full output of debuginfo, but, it should be enough to help.
Your inheritance and can_target chains are all over the place.
I've no idea if you've edited since you posted, but, it's obvious why some can do commands on others.
You're only specifying one group, for those few you specified correctly.
Those with !%superadmin would NOT (! = not) be able to target group (% = group) superadmin, or any group that inherits superadmin.
I've attempted to edit the output you gave me in order of how ULib sees it.

Code: [Select]
owner:
inherit_from = superadmin
superadmin:
inherit_from = admin
coowner:
can_target = !%superadmin
inherit_from = headadmin
headadmin:
can_target = !%superadmin
inherit_from = admin
vipadmin:
can_target = !%admin
inherit_from = admin
admin:
can_target = !%admin
inherit_from = moderator
donator:
can_target = superadmin
inherit_from = user
trusted:
can_target = superadmin
inherit_from = user
noaccess:
inherit_from = user
vipmod:
can_target = !%admin
inherit_from = moderator
moderator:
can_target = !%moderator
inherit_from = user
user:
can_target = superadmin
Most of the above groups inherit user, which, CAN target superadmin.
You may want to really study our FAQ on how can target works. Just remember can_target follows inheritance chains too (which, yours aren't fully linear, adding complexity)
http://forums.ulyssesmod.net/index.php/topic,5346.0.html
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline Zeroi9

  • Newbie
  • *
  • Posts: 11
  • Karma: 0
Re: How to set up groupcantarget?
« Reply #5 on: September 06, 2013, 04:03:11 PM »
Thank you for your reply, and sorry for my late reply.
That change did not work, vipadmin can be moved by admin, but not the other way around.

I also wonder, how can I make a rank that is allowed to spawn weapons etc from the Q menu, but isn't superadmin? I haven't found any option for this.

Offline Zeroi9

  • Newbie
  • *
  • Posts: 11
  • Karma: 0
Re: How to set up groupcantarget?
« Reply #6 on: September 11, 2013, 08:12:46 AM »
Still haven't fixed it, vip admin can be moved by admin but not vice versa.

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: How to set up groupcantarget?
« Reply #7 on: September 11, 2013, 03:26:49 PM »
Unless you've changed your inheritance tree from previously, it's obvious why.
You have vipadmin can_target !%admin, "!" = NOT, "%" = GROUP
 VIPADMIN can_target NOT GROUP admin.
Your admin can't target themselves, but inherits moderator.
Moderator can't target themselves, but inherits user.
user inherits superadmin, which starts cycle all over again.

You're inheritance and can target paths are all messed.
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming