OnServerUserSet
OxideCarbonServerCalled when server user set occurs.
void OnServerUserSet(ulong uid, ServerUsers.UserGroup group, string username, string notes, long expiry)Works — the game method in this build is the one the hook was written for.
Parameters
- uid
- ulong
- group
- ServerUsers.UserGroup
- username
- string
- notes
- string
- expiry
- long
Return value
voidThe return value is ignored — the hook only notifies.
Example
private void OnServerUserSet(ulong uid, ServerUsers.UserGroup group, string username, string notes, long expiry)
{
Puts("OnServerUserSet");
}Works in both Oxide and Carbon: Carbon loads Oxide plugins as is.
Injection point
Rust.opj (Oxide)
void ServerUsers.Set(ulong, ServerUsers.UserGroup, string, string, long)
Passes: ulong uid, ServerUsers.UserGroup group, string username, string notes, long expiry
WorksReturnBehavior: ContinueArgumentBehavior: JustParamsAssembly-CSharp.dll
Where it is called (this branch's game code)
// …
User value = new User
{
steamid = uid,
group = group,
username = username,
notes = notes,
expiry = expiry
};
Interface.CallHook("OnServerUserSet", uid, group, username, notes, expiry);
users.Add(uid, value);
}Sources: Rust.opj from OxideMod/Oxide.Rust (MIT) and hook metadata of the Carbon documentation (MIT). Method code is decompiled from this branch's server.