Author Topic: Get Table Of Current UserGroups  (Read 1968 times)

0 Members and 1 Guest are viewing this topic.

Offline kklouzal

  • Newbie
  • *
  • Posts: 5
  • Karma: 0
Get Table Of Current UserGroups
« on: February 04, 2014, 04:43:01 PM »
Hello, I am looking for a function that will return a table of all the usergroups on a server, I looked on the ulib wiki for such a function but have had no luck.
There must be such a thing since the XGUI has the drop down box that shows all the usergroups.

Thanks for all your help in advance! :)

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6214
  • Karma: 394
  • Project Lead
Re: Get Table Of Current UserGroups
« Reply #1 on: February 04, 2014, 06:36:57 PM »
ULib.ucl.groups (just don't modify this table)
Experiencing God's grace one day at a time.

Offline kklouzal

  • Newbie
  • *
  • Posts: 5
  • Karma: 0
Re: Get Table Of Current UserGroups
« Reply #2 on: February 04, 2014, 06:47:46 PM »
Thank you very much my good sir!

Offline kklouzal

  • Newbie
  • *
  • Posts: 5
  • Karma: 0
Re: Get Table Of Current UserGroups
« Reply #3 on: February 04, 2014, 08:08:11 PM »
Could I submit a feature request for an actual shared function to return this table, or just a table of the names of the groups and a hook which would fire when the groups have changed?

This would be very handy! :)

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: Get Table Of Current UserGroups
« Reply #4 on: February 04, 2014, 08:17:02 PM »
http://ulyssesmod.net/docs/files/lua/ulib/shared/defines-lua.html#UCLChanged
You could, but, likely won't go farther than that.
Too easy to just look for that hook and grab whatever is needed.
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming