Difference between revisions of "Category:LSL Avatar/Name"

From Second Life Wiki
Jump to navigation Jump to search
(Created page with '{{LSL Header}}{{LSLC|}}{{LSLC|Avatar}}Category:Display Names')
 
Line 1: Line 1:
{{LSL Header}}{{LSLC|}}{{LSLC|Avatar}}[[Category:Display Names]]
{{LSL Header}}{{LSLC|}}{{LSLC|Avatar}}[[Category:Display Names]]
===Names===
From an LSL standpoint avatars can have 3 different names.
{| {{Prettytable}}
! Name
! {{Hl2}} | Description
! {{Hl2}} | Get (in region)
! {{Hl2}} | Request ([[dataserver]])
! {{Hl2}} | [[llSensor]] / [[llSensorRepeat]]
|-
! {{Hl2}} | Display
| The name that is displayed on the screen.
| [[llGetDisplayName]]
| [[llRequestDisplayName]]
| NA
|-
! {{Hl2}} | User
| The name the users logs in with.
| [[llGetUsername]]
| [[llRequestUsername]]
| [[AGENT_BY_USERNAME]]
|-
! {{Hl2}} | Legacy
| An interface predating [[Display Names]].
| [[llKey2Name]]
| [[llRequestAgentData]]
| [[AGENT_BY_LEGACY_NAME]]
|}
{| {{prettytable|style=float:right;margin-top:0;}}
|+ <h4>Name Formats by Account Type</h4>
|
! {{Hl2}} | Modern
! {{Hl2}} | Legacy
|-
! {{Hl2}} | User Name
| "username"
| "firstname.lastname"
|-
! {{Hl2}} | Legacy Name
| "username Resident"
| "FirstName LastName"
|-
! {{Hl2}} | Display Default
| "username"
| "FirstName LastName"
|}
=== Modern and Legacy Accounts ===
* Modern accounts are created by choosing a user name, which consists of one name (no spaces).
* Legacy accounts were created by choosing two names, first and last names. These two names are used together to form the user name.
To maintain compatibility with legacy scripts (that expect two names), modern accounts are given the legacy last name "Resident".
The default value of the Display Name depends upon the type of the account. For legacy accounts, it's the Legacy Name, for modern accounts, its the User Name.
<lsl>string LegacyToUserName(string legacy)
{
    list name = llParseString2List(legacy, [" "]);
    if(llList2String(name, 1) == "Resident")//it's not a legacy account.
        return llList2String(name, 0);//first name is username
    return llToLower(llDumpList2String(name, "."));
}</lsl>

Revision as of 11:55, 23 September 2010

Names

From an LSL standpoint avatars can have 3 different names.

Name Description Get (in region) Request (dataserver) llSensor / llSensorRepeat
Display The name that is displayed on the screen. llGetDisplayName llRequestDisplayName NA
User The name the users logs in with. llGetUsername llRequestUsername AGENT_BY_USERNAME
Legacy An interface predating Display Names. llKey2Name llRequestAgentData AGENT_BY_LEGACY_NAME

Name Formats by Account Type

Modern Legacy
User Name "username" "firstname.lastname"
Legacy Name "username Resident" "FirstName LastName"
Display Default "username" "FirstName LastName"

Modern and Legacy Accounts

  • Modern accounts are created by choosing a user name, which consists of one name (no spaces).
  • Legacy accounts were created by choosing two names, first and last names. These two names are used together to form the user name.

To maintain compatibility with legacy scripts (that expect two names), modern accounts are given the legacy last name "Resident".

The default value of the Display Name depends upon the type of the account. For legacy accounts, it's the Legacy Name, for modern accounts, its the User Name.

<lsl>string LegacyToUserName(string legacy) {

   list name = llParseString2List(legacy, [" "]);
   if(llList2String(name, 1) == "Resident")//it's not a legacy account.
       return llList2String(name, 0);//first name is username
   return llToLower(llDumpList2String(name, "."));

}</lsl>

Subcategories

This category has the following 5 subcategories, out of 5 total.

Pages in category "LSL Avatar/Name"

The following 9 pages are in this category, out of 9 total.