AclGroupListACL: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
{{Server function}}<!-- Change this to "Client function" or "Server function" appropriately--> | {{Server function}}<!-- Change this to "Client function" or "Server function" appropriately--> | ||
<!-- Describe in plain english what this function does. Don't go into details, just give an overview --> | <!-- Describe in plain english what this function does. Don't go into details, just give an overview --> | ||
This function returns a table over all the ACL's that exist in a given ACL group. | This function returns a table over all the ACL's that exist in a given ACL group. | ||
Line 20: | Line 19: | ||
==Example== | ==Example== | ||
This example outputs the list of ACL's if the aclGroup name is given. | |||
<syntaxhighlight lang="lua">addCommandHandler("aclList",function(player,command,aclGroup) | |||
if(aclGroup~="")then | |||
table = aclGroupListACL(aclGetGroup(tostring(aclGroup))) | |||
for list,name in ipairs(#table)do | |||
count = 0 | |||
outputChatBox("ACL LIST: "..aclGroup.."Line: "..count.." ACL: "..name..".",player) | |||
count = count + 1 | |||
end | |||
else | |||
outputChatBox("Please add the aclGroup you want the list of.",player) | |||
outputChatBox("Syntax: /aclList aclGroup",player) | |||
end | |||
end) | |||
</syntaxhighlight> | </syntaxhighlight> | ||
Revision as of 22:04, 26 April 2012
This function returns a table over all the ACL's that exist in a given ACL group.
Syntax
table of acl aclGroupListACL ( aclgroup theGroup )
Required Arguments
- theGroup: The ACL group to get the ACL elements from
Returns
Returns a table over the ACL elements in the given ACL group. This table might be empty. Returns false or nil if theGroup is invalid or it fails for some other reason.
Example
This example outputs the list of ACL's if the aclGroup name is given.
addCommandHandler("aclList",function(player,command,aclGroup) if(aclGroup~="")then table = aclGroupListACL(aclGetGroup(tostring(aclGroup))) for list,name in ipairs(#table)do count = 0 outputChatBox("ACL LIST: "..aclGroup.."Line: "..count.." ACL: "..name..".",player) count = count + 1 end else outputChatBox("Please add the aclGroup you want the list of.",player) outputChatBox("Syntax: /aclList aclGroup",player) end end)
See Also
- aclCreate
- aclCreateGroup
- aclDestroy
- aclDestroyGroup
- aclGet
- aclGetGroup
- aclGetName
- aclGetRight
- aclGroupAddACL
- aclGroupAddObject
- aclGroupGetName
- aclGroupList
- aclGroupListACL
- aclGroupListObjects
- aclGroupRemoveACL
- aclGroupRemoveObject
- aclList
- aclListRights
- aclReload
- aclRemoveRight
- aclSave
- aclSetRight
- hasObjectPermissionTo
- isObjectInACLGroup