Add ULib.HOOK_ACCESS_REGISTERED to let anyone (XGUI) know when new accesses are registered.

Decided to keep the hook "grouped" when multiple accesses are added at once, thus, this callback will have no parameters.
This commit is contained in:
SticklyMan 2018-02-04 17:30:01 -07:00
parent eda6abdccd
commit 4926b5b9aa
3 changed files with 13 additions and 1 deletions

View File

@ -993,6 +993,7 @@ function ucl.registerAccess( access, groups, comment, category )
timer.Create( "ULibSaveGroups", 1, 1, function() -- 1 sec delay, 1 rep
ucl.saveGroups()
hook.Call( ULib.HOOK_UCLCHANGED )
hook.Call( ULib.HOOK_ACCESS_REGISTERED )
end )
end
end

View File

@ -87,6 +87,17 @@ ULib.HOOK_UCLAUTH = "UCLAuthed"
]]
ULib.HOOK_UCLCHANGED = "UCLChanged"
--[[
Hook: UCLAccessRegistered
Called *on both server and client* when one or more unrecognized accesses are registered. No parameters are passed to callbacks.
Revisions:
v2.70 - Initial
]]
ULib.HOOK_ACCESS_REGISTERED = "UCLAccessRegistered"
--[[
Hook: ULibReplicatedCvarChanged

View File

@ -1 +1 @@
1517790368
1517790602