forked from TeamUlysses/ulib
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:
parent
eda6abdccd
commit
4926b5b9aa
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
@ -1 +1 @@
|
||||
1517790368
|
||||
1517790602
|
||||
|
Loading…
Reference in New Issue
Block a user