The getprofiledata gets profile information of a named avatar.
| Command | Required Parameters | Required Corrade Permissions | Example |
|---|---|---|---|
getprofiledata | group, password, data, firstname, lastname (or agent by UUID) | interact | |
The data parameter follows the AvatarProperties, ProfileInterests and AvatarGroup libopenmetaverse structures and sub-structures.
| Parameter | Possible Values | Description |
|---|---|---|
data | AboutText | Second Life profile text |
AllowPublish | Should this profile be published on the web | |
FirstLifeImage | First Life image ID | |
FirstLifeText | First Life about text | |
Flags | Flags of the profile | |
MaturePublish | Is this a mature profile | |
ProfileImage | Profile image ID | |
ProfileURL | Web URL for this profile | |
LanguagesText | Languages profile field | |
SkillsMask | Skills mask | |
SkillsText | Skills text | |
WantToMask | WantTo mask | |
WantToText | WantTo text |
The SkillsMask and the SkillsText are special, they represent a bitfield mask corresponding to the individual tick-boxes on the interests profile tab.
The following table gives the individual values of each tick-box for the I Want To: section:
I Want To: | Value |
|---|---|
Build | 1 |
Explore | 2 |
Meet | 4 |
Group | 8 |
Buy | 16 |
Sell | 32 |
Be Hired | 64 |
Hire | 128 |
And the following table is for the skills section:
Skills: | Value |
|---|---|
Textures | 1 |
Architecture | 2 |
Event Planning | 4 |
Modeling | 8 |
Scripting | 16 |
Custom Characters | 32 |
Assuming that a request has been sent to Corrade to return the flags for the I Want To: section by setting the data parameter to wanttomask:
llInstantMessage(CORRADE,
wasKeyValueEncode(
[
"command", "getprofiledata",
"group", wasURLEscape(GROUP),
"password", wasURLEscape(PASSWORD),
// or "agent", "69ce412b-dffc-436d-86ff-d788bfa66d9d"
"firstname", "Kira",
"lastname", "Komarov",
"data", "WantToMask",
"callback", wasURLEscape(URL)
]
)
);
The response will come back the callback URL. We can then process the returned data and obtain the ticked checkboxes:
http_request(key id, string method, string body) {
// send OK to corrade's callback request
llHTTPResponse(id, 200, "Ok");
// first get the data an unescape it
list data = wasCSVToList(
wasURLUnescape(
wasKeyValueGet("data", body)
)
);
// data comes in as "wanttomask, NUMBER"
// so we get the NUMBER and store it
integer wanttomask = llList2Integer(
data,
llListFindList(
data,
["WantToMask"]
)+1
);
// finally, we get the flags from the mask
list flags = wasGetBitFlags(
wanttomask,
[ "Build", "Explore", "Meet", "Group", "Buy", "Sell", "Be Hired", "Hire" ]
);
// and print the list of set flags
llOwnerSay(wasListToCSV(flags));
}
The wasGetBitFlags function is a helper function that can be found in the LSL FUSS section.