OnClanMemberAdded
OxideCarbonClanCalled when a clan member is added.
void OnClanMemberAdded(long clanId, ulong steamId)Works — the game method in this build is the one the hook was written for.
Parameters
- clanId
- long
- steamId
- ulong
Return value
voidThe return value is ignored — the hook only notifies.
Example
private void OnClanMemberAdded(long clanId, ulong steamId)
{
Puts("OnClanMemberAdded");
}Works in both Oxide and Carbon: Carbon loads Oxide plugins as is.
Injection point
Rust.opj (Oxide)
bool LocalClanDatabase.AcceptInvite(long, ulong)
Passes: long clanId, ulong steamId
WorksReturnBehavior: ContinueArgumentBehavior: JustParamsRust.Clans.Local.dll
Where it is called (this branch's game code)
public bool AcceptInvite(long clanId, ulong steamId)
{
BeginTransaction();
try
{
if (DeleteInvite(clanId, steamId) && CreateMember(clanId, steamId))
{
Commit();
Interface.CallHook("OnClanMemberAdded", clanId, steamId);
return true;
}
Rollback();
return false;
}
catch
{
Rollback();
// …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.