RustTip

OnTick

OxideCarbonServer

Called when a remote RCON command is received.

Provides access to the raw RCON message so you can log or modify behavior.

void OnTick()
Works — the game method in this build is the one the hook was written for.

Parameters

No parameters.

Return value

voidThe return value is ignored — the hook only notifies.

Example

private void OnTick()
{
    Puts("OnTick");
}

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

Injection point

Rust.opj (Oxide)
void ServerMgr.DoTick()

Passes: —

WorksReturnBehavior: ContinueArgumentBehavior: NoneAssembly-CSharp.dll

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

private void DoTick()
{
	Interface.CallHook("OnTick");
	RustRelayFakePlayer.Tick();
	RCon.Update();
	CompanionServer.Server.Update();
	NexusServer.Update();
	for (int i = 0; i < Network.Net.sv.connections.Count; i++)
	{
		Network.Connection connection = Network.Net.sv.connections[i];
		if (!connection.isAuthenticated && !(connection.GetSecondsConnected() < (float)ConVar.Server.authtimeout))
// …

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.