Author Topic: How to change permissions for individual commands only  (Read 2556 times)

0 Members and 1 Guest are viewing this topic.

Offline Storm

  • Full Member
  • ***
  • Posts: 220
  • Karma: 4
How to change permissions for individual commands only
« on: October 02, 2013, 04:37:52 AM »
So here is what I want to do. I want players to use one command on themselves alone and not on other users. For example, if I want all users to be able to !jail themselves but not target others, how would I do that? I still want them to target others with voteban so I can't change their top level (manage permissions) "can target" to !%user. I also can't apply !%user to the access on the command itself or they can't jail anyone in the user category, including themselves. Is there a way to set access like "!%anyone but themselves"?

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6214
  • Karma: 394
  • Project Lead
Re: How to change permissions for individual commands only
« Reply #1 on: October 02, 2013, 05:02:57 AM »
ulx groupallow user "ulx jail" "^"

As explained in various places (notable, "ulx help"), "^" means self.
Experiencing God's grace one day at a time.

Offline Storm

  • Full Member
  • ***
  • Posts: 220
  • Karma: 4
Re: How to change permissions for individual commands only
« Reply #2 on: October 02, 2013, 08:50:12 AM »
So sorry! I completely missed that!

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6214
  • Karma: 394
  • Project Lead
Re: How to change permissions for individual commands only
« Reply #3 on: October 02, 2013, 03:27:02 PM »
No worries.
Experiencing God's grace one day at a time.

Offline Storm

  • Full Member
  • ***
  • Posts: 220
  • Karma: 4
Re: How to change permissions for individual commands only
« Reply #4 on: October 10, 2013, 08:24:14 AM »
Megiddo, can I just ask another question about this? I did look in ulx help but couldn't see the answer. Right now, users cant target vips and above at all. But I have a problem with them playing with the voteban menu and votebanning themselves. So if I put in that module the permission !^, will it stiil retain inheritance (if I don't check ignore inheritance) and not let them ban vips and above? My goal is that they can voteban other users but not themselves or any other group level. Thanks again!

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: How to change permissions for individual commands only
« Reply #5 on: October 10, 2013, 01:54:49 PM »
Our FAQs here in the forums are pretty good too.
http://forums.ulyssesmod.net/index.php/topic,5346.0.html
They expand on ULX help pretty well, especially that one.
To answer your question, setting !^ for a single command has no effect on inheritance.
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6214
  • Karma: 394
  • Project Lead
Re: How to change permissions for individual commands only
« Reply #6 on: October 10, 2013, 04:41:59 PM »
Inheritance is a something different than what you seem to be asking.

You simply want to set the permission of voteban like so:

Code: [Select]
ulx groupallow user "ulx voteban" "!^"
Experiencing God's grace one day at a time.