RustTip

OnFeedbackReported

OxideCarbonPlayer

Called when a feedback is reported.

void OnFeedbackReported(BasePlayer local1, string local2, string local3, Facepunch.Models.ReportType local5)
Works — the game method in this build is the one the hook was written for.

Parameters

local1
BasePlayer
local2
string
local3
string
local5
Facepunch.Models.ReportType

Return value

voidThe return value is ignored — the hook only notifies.

Example

private void OnFeedbackReported(BasePlayer local1, string local2, string local3, Facepunch.Models.ReportType local5)
{
    Puts("OnFeedbackReported");
}

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

Injection point

Rust.opj (Oxide)
void BasePlayer.<OnFeedbackReport>d__779.MoveNext()

Passes: BasePlayer local1, string local2, string local3, Facepunch.Models.ReportType local5

WorksReturnBehavior: ContinueArgumentBehavior: UseArgumentString (l1, l2, l3, l5)Assembly-CSharp.dll

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

// …
	{
		PlayerId = basePlayer.UserIDString,
		PlayerName = basePlayer.displayName,
		Subject = text,
		Message = text3,
		Type = reportType
	});
}
Interface.CallHook("OnFeedbackReported", basePlayer, text, text2, reportType);
if (!string.IsNullOrEmpty(Server.reportsServerEndpoint))
{
	string image = msg.read.StringMultiLine(60000);
	Facepunch.Models.Feedback feedback = new Facepunch.Models.Feedback
	{
		Type = reportType,
		Message = text3,
		Subject = text
// …

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.