RustTip

OnClanMemberKicked

OxideCarbonClan

Called when a clan member is kicked.

void OnClanMemberKicked(LocalClan local1, ulong steamId, ulong bySteamId)
Works — the game method in this build is the one the hook was written for.

Parameters

local1
LocalClan
steamId
ulong
bySteamId
ulong

Return value

voidThe return value is ignored — the hook only notifies.

Example

private void OnClanMemberKicked(LocalClan local1, ulong steamId, ulong bySteamId)
{
    Puts("OnClanMemberKicked");
}

Works in both Oxide and Carbon: Carbon loads Oxide plugins as is.

Injection point

Rust.opj (Oxide)
void LocalClan.<Kick>d__65.MoveNext()

Passes: LocalClan local1, ulong steamId, ulong bySteamId

WorksReturnBehavior: ContinueArgumentBehavior: UseArgumentString (l1, this.steamId, this.bySteamId)Rust.Clans.Local.dll

Where it is called (this branch's game code)

// …
if (localClan._backend.Database.DeleteMember(localClan.ClanId, steamId))
{
	if (flag)
	{
		localClan._backend.Database.AppendLog(localClan.ClanId, "leave", steamId);
	}
	else
	{
		Interface.CallHook("OnClanMemberKicked", localClan, this.steamId, this.bySteamId);
		localClan._backend.Database.AppendLog(localClan.ClanId, "kick", bySteamId, steamId);
	}
	localClan.Changed(ClanDataSource.Members);
	localClan._backend.MembershipChanged(steamId, null);
	result = ClanResult.Success;
}
else
{
// …

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.