Jump to content

acl write and admin rights


-misterX-

Recommended Posts

i got this code it should create an acl group but it doesn't, i gave it the admin rights but when i try to use the function it remove itslef from the acl..

function addACLGroupObject ( thePlayer, commandName, groupName) 
    local ourGroup = aclGetGroup ( groupName ) 
    -- if there is no previous group with this name, we need to create one 
    if not ourGroup then 
        ourGroup = aclCreateGroup ( groupName ) 
    end 
     -- and finally let's add the object to it's group 
    account = getPlayerAccount(source) 
    accountN = getAccountName(account) 
    aclGroupAddObject ( ourGroup, accountN ) 
    -- don't forget to save the ACL after it has been modified 
    aclSave () 
end 
addCommandHandler ( "creategang", addACLGroupObject ) 

Link to comment
function addACLGroupObject ( thePlayer, commandName, groupName) 
    local ourGroup = aclGetGroup ( groupName ) 
    -- if there is no previous group with this name, we need to create one 
    if not ourGroup then 
        ourGroup = aclCreateGroup ( groupName ) 
    end 
     -- and finally let's add the object to it's group 
    account = getPlayerAccount(thePlayer) 
    accountN = getAccountName(account) 
    aclGroupAddObject ( ourGroup, 'user.'..accountN ) 
    -- don't forget to save the ACL after it has been modified 
    aclSave () 
end 
addCommandHandler ( "creategang", addACLGroupObject ) 

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...