Ulysses

General => Developers Corner => Topic started by: Ludicium on December 03, 2012, 02:38:43 PM

Title: Function to return list of groups?
Post by: Ludicium on December 03, 2012, 02:38:43 PM
I am writing a script and I need to be able to get all the groups on a server from ulx, any thoughts? I already took a look at the ulib documentation and I didn't see anything but then again I didn't look very hard.
Title: Re: Function to return list of groups?
Post by: MrPresident on December 03, 2012, 02:58:16 PM
The groups are stored in this table:

ULib.ucl.groups

if you were do do something like...

for k, v in pairs(ULib.ucl.groups) do
     print(k)
end

it would return a list of all the groups.
Title: Re: Function to return list of groups?
Post by: Ludicium on December 03, 2012, 03:39:14 PM
So the index is the group name. I see thanks :).