Prevent ulx adduserid from resetting user allows/denies

This commit is contained in:
Timmy 2020-07-24 22:58:49 +02:00
parent a8b31ffb3e
commit 7b67567690
No known key found for this signature in database
GPG Key ID: 05C56A737C5AC029

View File

@ -71,7 +71,8 @@ function ulx.adduserid( calling_ply, id, group_name )
if not checkForValidId( calling_ply, id ) then return false end
-- Now add the fool!
ULib.ucl.addUser( id, allows, denies, group_name )
local userInfo = ULib.ucl.users[ id ] or ULib.DEFAULT_GRANT_ACCESS
ULib.ucl.addUser( id, userInfo.allow, userInfo.deny, group_name )
if ULib.ucl.users[ id ] and ULib.ucl.users[ id ].name then
ulx.fancyLogAdmin( calling_ply, "#A added #s to group #s", ULib.ucl.users[ id ].name, group_name )