Ulysses

General => Developers Corner => Topic started by: kklouzal on February 04, 2014, 04:43:01 PM

Title: Get Table Of Current UserGroups
Post by: kklouzal 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! :)
Title: Re: Get Table Of Current UserGroups
Post by: Megiddo on February 04, 2014, 06:36:57 PM
ULib.ucl.groups (just don't modify this table)
Title: Re: Get Table Of Current UserGroups
Post by: kklouzal on February 04, 2014, 06:47:46 PM
Thank you very much my good sir!
Title: Re: Get Table Of Current UserGroups
Post by: kklouzal 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! :)
Title: Re: Get Table Of Current UserGroups
Post by: JamminR on February 04, 2014, 08:17:02 PM
http://ulyssesmod.net/docs/files/lua/ulib/shared/defines-lua.html#UCLChanged (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.