feat(addCommand): Allow multiple groups (#57)

This commit is contained in:
Jag authored and GitHub committed 2022-07-12 18:50:01 +10:00
1 parent 9bc37b461d
commit 3c82b654ff
1 file changed
+6
+6
View File
@@ -90,9 +90,15 @@ local function addCommand(group, name, callback, parameters, help)
end, group and true) end, group and true)
name = ('command.%s'):format(name) name = ('command.%s'):format(name)
if type(group) == 'table' then
for _, v in ipairs(group) do
if not IsPrincipalAceAllowed(v, name) then lib.addAce(v, name) end
end
else
if not IsPrincipalAceAllowed(group, name) then lib.addAce(group, name) end if not IsPrincipalAceAllowed(group, name) then lib.addAce(group, name) end
end end
end end
end
return addCommand return addCommand