@@ -3,8 +3,11 @@ if not Config.AcePermsEnabled then return end
33local pairs = pairs
44local tostring = tostring
55
6+ local _GetIdentifiersTable = GetIdentifiersTable
7+ local _getRoles = getRoles
68local _ExecuteCommand = ExecuteCommand
79local _GetPlayerName = GetPlayerName
10+ local _Log = Log
811
912local groups = Config .Groups
1013local permissions = Config .Permissions
@@ -18,7 +21,7 @@ local permissionAdd = "add_ace identifier.%s \"%s\" allow"
1821local permissionRemove = " remove_ace identifier.%s \" %s\" allow"
1922
2023local function applyPermissions (source )
21- local identifiers = GetIdentifiersTable (source )
24+ local identifiers = _GetIdentifiersTable (source )
2225 local license , discord = identifiers .license , identifiers .discord
2326
2427 for _ , v in pairs (groupsToRemove ) do
@@ -31,7 +34,7 @@ local function applyPermissions(source)
3134
3235 if not discord then return end
3336
34- local roles = getRoles (source )
37+ local roles = _getRoles (source )
3538 if roles == nil then return end
3639
3740 local name = _GetPlayerName (source ) or " "
@@ -41,15 +44,15 @@ local function applyPermissions(source)
4144 local permissionInformation = permissions [tostring (v )]
4245
4346 if not groupInformation then goto skipGroupInformation end
44- ExecuteCommand (groupAdd :format (license , groupInformation ))
45- Log (" Granted \" " .. groupInformation .. " \" to " .. name .. " (" .. license .. " )." )
47+ _ExecuteCommand (groupAdd :format (license , groupInformation ))
48+ _Log (" Granted \" " .. groupInformation .. " \" to " .. name .. " (" .. license .. " )." )
4649 :: skipGroupInformation::
4750
4851 if not permissionInformation then goto skipPermissionInformation end
49- Log (" Granting permission set for role ID: " .. v .. " ." )
52+ _Log (" Granting permission set for role ID: " .. v .. " ." )
5053 for _ , v2 in pairs (permissionInformation ) do
51- ExecuteCommand (permissionAdd :format (license , v2 ))
52- Log (" Granted \" " .. v2 .. " \" to " .. name .. " (" .. license .. " ) due to them having the role ID: " .. v .. " ." )
54+ _ExecuteCommand (permissionAdd :format (license , v2 ))
55+ _Log (" Granted \" " .. v2 .. " \" to " .. name .. " (" .. license .. " ) due to them having the role ID: " .. v .. " ." )
5356 end
5457 :: skipPermissionInformation::
5558 end
0 commit comments