ULX

Author Topic: Table of perms  (Read 3415 times)

0 Members and 2 Guests are viewing this topic.

Offline dankpepe

  • Jr. Member
  • **
  • Posts: 51
  • Karma: 1
Table of perms
« on: May 24, 2016, 07:45:29 PM »
Is there a way to create a table of the permissions of an entire ulx group that will update automatically?

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: Table of perms
« Reply #1 on: May 24, 2016, 08:05:37 PM »
https://forums.ulyssesmod.net/index.php/topic,9359.msg47878.html#msg47878

ULib updates this UCL automatically on it's own any time a parameter changes.
Unsure what else you mean.
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline dankpepe

  • Jr. Member
  • **
  • Posts: 51
  • Karma: 1
Re: Table of perms
« Reply #2 on: May 24, 2016, 08:42:38 PM »
I have a script that changes your user group to user and gives you the permissions you had based on your rank because I made a few tables of all the permissions. Is there any way I can call a table of the  permissions a group has, to assign to an individual player without creating an entirely new which inherits from the group they were in?

Offline roastchicken

  • Respected Community Member
  • Sr. Member
  • *****
  • Posts: 476
  • Karma: 84
  • I write code
Re: Table of perms
« Reply #3 on: May 25, 2016, 09:32:32 AM »
I have a script that changes your user group to user and gives you the permissions you had based on your rank because I made a few tables of all the permissions. Is there any way I can call a table of the  permissions a group has, to assign to an individual player without creating an entirely new which inherits from the group they were in?

The only thing I can ask is why?

You're completely undermining the entire point of the permission system. The whole point of groups is so you don't have to assign permissions to people individually, and can instead assign them to groups.
Give a man some code and you help him for a day; teach a man to code and you help him for a lifetime.

Offline dankpepe

  • Jr. Member
  • **
  • Posts: 51
  • Karma: 1
Re: Table of perms
« Reply #4 on: May 25, 2016, 01:17:34 PM »
I made an undercover addon and I want it to be able to give permissions to players when they use it. I know the perms are saved in data/ulib/groups.txt, but I was wondering if I could somehow give that table of permissions to a player. How I have it now is I have a table of perms for a specific server, but this won't be helpful on any other server.

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: Table of perms
« Reply #5 on: May 25, 2016, 03:30:29 PM »
As stated in previously linked post, all live information is stored in ULib.ucl, including players with special access, groups, the commands those players and groups has, and tons of other stuff. Groups.txt and users.txt are actually files from that table.
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline dankpepe

  • Jr. Member
  • **
  • Posts: 51
  • Karma: 1
Re: Table of perms
« Reply #6 on: May 26, 2016, 03:47:44 AM »
So would there be a way to either include the file or read it? Does file.read work similarly to include so I could use the information from that file?

An Error Has Occurred!

array_keys(): Argument #1 ($array) must be of type array, null given