Category:LSL Username: Difference between revisions
Jump to navigation
Jump to search
clearer syntax |
move old code here since it is not as useful (except for informational purposes) |
||
| Line 12: | Line 12: | ||
| "firstname" | | "firstname" | ||
|} | |} | ||
<lsl>string LegacyToUsername(string legacy) | |||
{ | |||
list name = llParseString2List(llToLower(legacy), [" "],[]); | |||
if(llList2String(name, 1) == "resident")//it's not a legacy account. | |||
return llList2String(name, 0);//first name is username | |||
return llDumpList2String(name, "."); | |||
}</lsl> | |||
See {{LSLGC|Avatar/Name}} for more details. | See {{LSLGC|Avatar/Name}} for more details. | ||
Revision as of 16:10, 24 February 2012
| LSL Portal | Functions | Events | Types | Operators | Constants | Flow Control | Script Library | Categorized Library | Tutorials |
A user's username depends upon what type of account it is:
| Type | Format |
|---|---|
| Legacy | "firstname.lastname" |
| Modern | "firstname" |
<lsl>string LegacyToUsername(string legacy) {
list name = llParseString2List(llToLower(legacy), [" "],[]);
if(llList2String(name, 1) == "resident")//it's not a legacy account.
return llList2String(name, 0);//first name is username
return llDumpList2String(name, ".");
}</lsl>
See Avatar/Name for more details.
Pages in category "LSL Username"
The following 3 pages are in this category, out of 3 total.