Merge pull request #170 from Timmy/fix-adduserid

Prevent `ulx adduserid` from resetting user allows/denies
This commit is contained in:
Zach P 2021-07-15 16:47:46 -07:00 committed by GitHub
commit 371a4fba62
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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 )