- Documentation
- Server functions
- aclCreate
Function
aclCreate
Creates an access control list (ACL) with the given name. A list holds rights, and groups connect lists with players and resources. aclSave stores the changes.
Syntax
acl aclCreate(string aclName)Arguments
aclNamestring- List name.
Returns
The list (its name) or false.
Example
A moderator group with the right to the /kick command.
local acl = aclCreate("Moderator")
aclSetRight(acl, "command.kick", true)
aclSetRight(acl, "command.ban", false)
local group = aclCreateGroup("Moderatorzy")
aclGroupAddACL(group, acl)
aclGroupAddObject(group, "user.jan")
aclSave()
See also
aclSetRightSets a right on a list. Right names:"command.name","function.name","resource.name"or your own ("general.name"). The fourth argument sets an expiry.aclCreateGroupCreates a permission group. Add lists (aclGroupAddACL) and objects (aclGroupAddObject) to the group.aclGroupAddACLAdds an access list to a group.aclSaveSaves the ACL toacl.jsonin the server folder.