OnServerInformationUpdated
OxideCarbonServerCalled after server information and Steam keys are updated.
void OnServerInformationUpdated()Method changed — check — the game method differs from the one the hook is recorded for in Oxide. The hook is still called, but its place may have shifted — worth checking after an update.
Parameters
No parameters.
Return value
voidThe return value is ignored — the hook only notifies.
Example
private void OnServerInformationUpdated()
{
Puts("OnServerInformationUpdated");
}Works in both Oxide and Carbon: Carbon loads Oxide plugins as is.
Injection point
Rust.opj (Oxide)
void ServerMgr.UpdateServerInformation()
Passes: —
Method changed — checkReturnBehavior: ContinueArgumentBehavior: NoneAssembly-CSharp.dll
Where it is called (this branch's game code)
// …
}
SetSteamKey("gmn", GamemodeName());
SetSteamKey("gmt", GamemodeTitle());
SetSteamKey("uptime", ((int)UnityEngine.Time.realtimeSinceStartup / 900 * 900).ToString());
SetSteamKey("gc_mb", Performance.report.memoryAllocations.ToString());
SetSteamKey("gc_cl", RoundToTwoSignificantFigures(Performance.report.memoryCollections).ToString());
SetSteamKey("ram_sys", ((Performance.report.memoryUsageSystem / 1000000 + 50) / 100 * 100).ToString());
SetSteamKey("fps", Performance.report.frameRate.ToString());
Interface.CallHook("OnServerInformationUpdated");
SetSteamKey("fps_avg", Mathf.Min(Mathf.RoundToInt(Performance.report.frameRateAverage), 512).ToString());
SetSteamKey("ent_cnt", ((BaseNetworkable.serverEntities.Count + 500) / 1000 * 1000).ToString());
SetSteamKey("build", BuildInfo.Current.Scm.ChangeId);
}
CrashSessionMarker.RefreshFromServerTags();
}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.