Defines

Holds some defines used on both client and server.

Summary
DefinesHolds some defines used on both client and server.
HooksThese are the hooks that ULib has created that other modders are free to make use of.
Hooks
UCLAuthedCalled on both server and client when a player has been (re)authenticated by UCL.
UCLChangedCalled on both server and client when anything in ULib.ucl.users, ULib.ucl.authed, or ULib.ucl.groups changes.
UCLAccessRegisteredCalled on both server and client when one or more unrecognized accesses are registered.
ULibReplicatedCvarChangedCalled on both client and server when a replicated cvar changes or is created.
ULibLocalPlayerReadyCalled on both client and server when a player entity is created.
ULibCommandCalledCalled on server whenever a ULib command is run, return false to override and not allow, true to stop executing callbacks and allow.
ULibPlayerTargetCalled whenever one player is about to target another player.
ULibPlayerTargetsCalled whenever one player is about to target another set of players.
ULibPostTranslatedCommandServer hook.
ULibPlayerNameChangedCalled within one second of a player changing their name.
ULibGetUsersCustomKeywordCalled during ULib.getUsers when considering a target string for keywords.
ULibGetUserCustomKeywordCalled during ULib.getUser when considering a target string for keywords.
ULibPlayerKickedCalled during ULib.kick.
ULibPlayerBannedCalled during ULib.addBan.
ULibPlayerUnBannedCalled during ULib.unban.
ULibGroupCreatedCalled during ULib.ucl.addGroup.
ULibGroupRemovedCalled during ULib.ucl.removeGroup.
ULibGroupAccessChangedCalled during ULib.ucl.groupAllow.
ULibGroupRenamedCalled during ULib.ucl.renameGroup.
ULibGroupInheritanceChangedCalled during ULib.ucl.setGroupInheritance.
ULibGroupCanTargetChangedCalled during ULib.ucl.setGroupCanTarget.
ULibUserGroupChangeCalled during ULib.ucl.addUser.
ULibUserAccessChangeCalled during ULib.ucl.userAllow.
ULibUserRemovedCalled during ULib.ucl.removeUser.
UCL HelpersThese defines are server-only, to help with UCL.
Net pooled stringsThese defines are server-only, to help with the networking library.

Hooks

These are the hooks that ULib has created that other modders are free to make use of.

Summary
Hooks
UCLAuthedCalled on both server and client when a player has been (re)authenticated by UCL.
UCLChangedCalled on both server and client when anything in ULib.ucl.users, ULib.ucl.authed, or ULib.ucl.groups changes.
UCLAccessRegisteredCalled on both server and client when one or more unrecognized accesses are registered.
ULibReplicatedCvarChangedCalled on both client and server when a replicated cvar changes or is created.
ULibLocalPlayerReadyCalled on both client and server when a player entity is created.
ULibCommandCalledCalled on server whenever a ULib command is run, return false to override and not allow, true to stop executing callbacks and allow.
ULibPlayerTargetCalled whenever one player is about to target another player.
ULibPlayerTargetsCalled whenever one player is about to target another set of players.
ULibPostTranslatedCommandServer hook.
ULibPlayerNameChangedCalled within one second of a player changing their name.
ULibGetUsersCustomKeywordCalled during ULib.getUsers when considering a target string for keywords.
ULibGetUserCustomKeywordCalled during ULib.getUser when considering a target string for keywords.
ULibPlayerKickedCalled during ULib.kick.
ULibPlayerBannedCalled during ULib.addBan.
ULibPlayerUnBannedCalled during ULib.unban.
ULibGroupCreatedCalled during ULib.ucl.addGroup.
ULibGroupRemovedCalled during ULib.ucl.removeGroup.
ULibGroupAccessChangedCalled during ULib.ucl.groupAllow.
ULibGroupRenamedCalled during ULib.ucl.renameGroup.
ULibGroupInheritanceChangedCalled during ULib.ucl.setGroupInheritance.
ULibGroupCanTargetChangedCalled during ULib.ucl.setGroupCanTarget.
ULibUserGroupChangeCalled during ULib.ucl.addUser.
ULibUserAccessChangeCalled during ULib.ucl.userAllow.
ULibUserRemovedCalled during ULib.ucl.removeUser.

Hooks

UCLAuthed

Called on both server and client when a player has been (re)authenticated by UCL.  Called for ALL players, regardless of access.

Parameters passed to callback

plyThe player that got (re)authenticated.

Revisions

v2.40Initial

UCLChanged

Called on both server and client when anything in ULib.ucl.users, ULib.ucl.authed, or ULib.ucl.groups changes.  No parameters are passed to callbacks.

Revisions

v2.40Initial

UCLAccessRegistered

Called on both server and client when one or more unrecognized accesses are registered.  No parameters are passed to callbacks.

Revisions

v2.70Initial

ULibReplicatedCvarChanged

Called on both client and server when a replicated cvar changes or is created.

Parameters passed to callback

sv_cvarThe name of the server-side cvar.
cl_cvarThe name of the client-side cvar.
plyThe player changing the cvar or nil on initial value.
old_valueThe previous value of the cvar, nil if this call is to set the initial value.
new_valueThe new value of the cvar.

Revisions

v2.40Initial
v2.50Removed nil on client side restriction.

ULibLocalPlayerReady

Called on both client and server when a player entity is created.  (can now run commands).  Only works for local player on the client side.

Parameters passed to callback

plyThe player that’s ready (local player on client side).

Revisions

v2.40Initial

ULibCommandCalled

Called on server whenever a ULib command is run, return false to override and not allow, true to stop executing callbacks and allow.

Parameters passed to callback

plyThe player attempting to execute the command.
commandNameThe command that’s being executed.
argsThe table of args for the command.

Revisions

v2.40Initial

ULibPlayerTarget

Called whenever one player is about to target another player.  Called BEFORE any other validation takes place.  Return false and error message to disallow target completely, return true to override any other validation logic and allow the target to take place, return a player to force the target to be the specified player.

Parameters passed to callback

plyThe player attempting to execute the command.
commandNameThe command that’s being executed.
targetThe proposed target of the command before any other validation logic takes place.

Revisions

v2.40Initial

ULibPlayerTargets

Called whenever one player is about to target another set of players.  Called BEFORE any other validation takes place.  Return false and error message to disallow target completely, return true to override any other validation logic and allow the target to take place, return a table of players to force the targets to be the specified players.

Parameters passed to callback

plyThe player attempting to execute the command.
commandNameThe command that’s being executed.
targetsThe proposed targets of the command before any other validation logic takes place.

Revisions

v2.40Initial

ULibPostTranslatedCommand

Server hook.  Called after a translated command (ULib.cmds.TranslatedCommand) has been successfully verified.  This hook directly follows the callback for the command itself.

Parameters passed to callback

plyThe player that executed the command.
commandNameThe command that’s being executed.
translated_argsA table of the translated arguments, as passed into the callback function itself.

Revisions

v2.40Initial

ULibPlayerNameChanged

Called within one second of a player changing their name.

Parameters passed to callback

plyThe player that changed names.
oldNameThe player’s old name, before the change.
newNameThe player’s new name, after the change.

Revisions

v2.40Initial

ULibGetUsersCustomKeyword

Called during ULib.getUsers when considering a target string for keywords.  This could be used to create a new, custom keyword for targeting users who have been connected for less than five minutes, for example.  Return nil or a table of player objects to add to the target list.

Parameters passed to callback

targetA string chunk of a possibly larger target list to operate on.
plyThe player doing the targeting, not always specified (can be nil).

Revisions

v2.60Initial

ULibGetUserCustomKeyword

Called during ULib.getUser when considering a target string for keywords.  This could be used to create a new, custom keyword for always targeting a specific connected steamid, for example.  Or, to target the shortest connected player.  Return nil or a player object.

Parameters passed to callback

targetA string target.
plyThe player doing the targeting, not always specified (can be nil).

Revisions

v2.60Initial

ULibPlayerKicked

Called during ULib.kick.  This alerts you to the player being kicked.

Parameters passed to callback

steamidString of SteamID of the kicked player.
reasonString of kick reason or nil.
callerPlayer object of whomever did the kick or nil.

Revisions

v2.62Initial

ULibPlayerBanned

Called during ULib.addBan.  This alerts you to the player being banned.

Parameters passed to callback

steamidString of SteamID of the banned player.
ban_dataThe table data about the ban, exactly like it would be stored in ULib.bans.

Revisions

v2.62Initial

ULibPlayerUnBanned

Called during ULib.unban.  This alerts you to the player being banned.

Parameters passed to callback

steamidString of SteamID for the unbanned player.
adminThe unbaning player object or nil.

Revisions

v2.62Initial

ULibGroupCreated

Called during ULib.ucl.addGroup.  This alerts you to the group being created.

Parameters passed to callback

group_nameString of Group Name
group_dataGroup table as it is stored in ULib.ucl.groups[ name ].

Revisions

v2.62Initial

ULibGroupRemoved

Called during ULib.ucl.removeGroup.  This alerts you to the group being removed.

Parameters passed to callback

group_nameString of Group Name
group_dataGroup table as it is stored in ULib.ucl.groups[ name ].

Revisions

v2.62Initial

ULibGroupAccessChanged

Called during ULib.ucl.groupAllow.  This alerts you to the group access being changed.

Parameters passed to callback

group_nameString of Group Name
accessString of access being changed
revokeBoolean, Are we adding(false/nil) or revoking(true)

Revisions

v2.62Initial

ULibGroupRenamed

Called during ULib.ucl.renameGroup.  This alerts you to the group being renamed.

Parameters passed to callback

old_nameString of Old Group Name
new_nameString of New Group Name

Revisions

v2.62Initial

ULibGroupInheritanceChanged

Called during ULib.ucl.setGroupInheritance.  This alerts you to the group Inheritance being changed.

Parameters passed to callback

group_nameString of Group Name
new_inheritString of New Inheritance
old_inheritString of Old Inheritance

Revisions

v2.62Initial

ULibGroupCanTargetChanged

Called during ULib.ucl.setGroupCanTarget.  This alerts you to the group CanTarget being changed.

Parameters passed to callback

group_nameString of Group Name
new_targetString of New CanTarget
old_targetString of Old CanTarget

Revisions

v2.62Initial

ULibUserGroupChange

Called during ULib.ucl.addUser.  This alerts you to the user’s group being changed.

Parameters passed to callback

idString steamid of the user.
allowsAllows Table
deniesDenies Table
new_groupString of New Group
old_groupString of Old Group

Revisions

v2.62Initial

ULibUserAccessChange

Called during ULib.ucl.userAllow.  This alerts you to the user’s access being changed.

Parameters passed to callback

idThe string steamid of the user.
accessThe string of access being changed
revokeBoolean, are we adding(false/nil) or revoking(true)
denyBoolean, are we denying(true) or allowing(false/nil)

Revisions

v2.62Initial

ULibUserRemoved

Called during ULib.ucl.removeUser.  This alerts you to the user’s group being removed.

Parameters passed to callback

idThe string steamid of the user.
user_infoTable of old user info (group, allows, denys, etc) as stored in ULib.ucl.users[id] before the change.

Revisions

v2.62Initial

UCL Helpers

These defines are server-only, to help with UCL.

Net pooled strings

These defines are server-only, to help with the networking library.

Close