Skip to content

OnUserApproved

Called when a user is approved for connection

Usage

  • Return type non-null to prevent default behavior

Example Autogenerated

csharp
private object OnUserApproved( string username, string userid, string ipaddr )
{
    Puts( "OnUserApproved works!" );
    return null;
}

Location

  • RustCore::IOnUserApprove(Connection connection)
csharp
	object obj3 = ((obj == null) ? obj2 : obj);
	if (obj3 is string || (obj3 is bool && !(bool)obj3))
	{
		ConnectionAuth.Reject(connection, (obj3 is string) ? obj3.ToString() : this.lang.GetMessage("ConnectionRejected", this, text), null);
		return true;
	}
	object obj4 = Interface.CallHook("OnUserApprove", connection);
	object obj5 = Interface.CallHook("OnUserApproved", username, text, text2);
	if (obj4 != null)
	{
		return obj4;
	}
	return obj5;
}

Released under the MIT License.