Jump to content

get the player's group name?


Tete omar

Recommended Posts

Because he made a function to get them.

function aclGetAccountGroups ( account ) 
    local acc = getAccountName ( account ) 
    if ( not acc ) then return false end 
    local res = {} 
    acc = "user."..acc 
    local all = "user.*" 
    for ig, group in ipairs ( aclGroupList() ) do 
        for io, object in ipairs ( aclGroupListObjects ( group ) ) do 
            if ( ( acc == object ) or ( all == object ) ) then 
                table.insert ( res, aclGroupGetName ( group ) ) 
                break 
            end 
        end 
    end 
    return res 
end 

You should ask him before use it though.

Link to comment
Because he made a function to get them.
function aclGetAccountGroups ( account ) 
    local acc = getAccountName ( account ) 
    if ( not acc ) then return false end 
    local res = {} 
    acc = "user."..acc 
    local all = "user.*" 
    for ig, group in ipairs ( aclGroupList() ) do 
        for io, object in ipairs ( aclGroupListObjects ( group ) ) do 
            if ( ( acc == object ) or ( all == object ) ) then 
                table.insert ( res, aclGroupGetName ( group ) ) 
                break 
            end 
        end 
    end 
    return res 
end 

You should ask him before use it though.

should i want him to be online on IRC ?

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...