Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Name2Key()?

Zena Juran
Registered User
Join date: 21 Jul 2007
Posts: 473
01-21-2009 17:42
HIyas Everyone,

Found this http://wiki.secondlife.com/wiki/Name2Key_in_LSL while doing some research. I couldn't make heads or tails after reading the comments. Does there exist a resident defined workaround for Name2Key(). I give up on expecting anything from Linden Lab in this matter. Thanx :-)
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
01-21-2009 19:27
a few... but the tops would be w-hat, which allows you to make an hhtp query using the resident name and get the key back. the other method is to query inworld search with a specialized query and capture the key in the address, both methods are found on the forum in detail
_____________________
|
| . "Cat-Like Typing Detected"
| . This post may contain errors in logic, spelling, and
| . grammar known to the SL populace to cause confusion
|
| - Please Use PHP tags when posting scripts/code, Thanks.
| - Can't See PHP or URL Tags Correctly? Check Out This Link...
| -
SuezanneC Baskerville
Forums Rock!
Join date: 22 Dec 2003
Posts: 14,229
01-21-2009 19:39
This website, http://www.alpha-fox.com/name2key, has a manual search, and includes a statement that you can use this url:

http://name2key.alpha-fox.com/?name=[NAME HERE]

in an llHttpRequest to fetch a key.
_____________________
-

So long to these forums, the vBulletin forums that used to be at forums.secondlife.com. I will miss them.

I can be found on the web by searching for "SuezanneC Baskerville", or go to

http://www.google.com/profiles/suezanne

-

http://lindenlab.tribe.net/ created on 11/19/03.

Members: Ben, Catherine, Colin, Cory, Dan, Doug, Jim, Philip, Phoenix, Richard,
Robin, and Ryan

-
Zoey Helgerud
Overqualified
Join date: 13 Jun 2007
Posts: 44
01-21-2009 19:47
From: Zena Juran
HIyas Everyone,

Found this http://wiki.secondlife.com/wiki/Name2Key_in_LSL while doing some research. I couldn't make heads or tails after reading the comments. Does there exist a resident defined workaround for Name2Key(). I give up on expecting anything from Linden Lab in this matter. Thanx :-)


You know, you could try looking a little bit more:

http://wiki.secondlife.com/wiki/LlName2Key
Says right on that page that the function does not exist.


also:
http://w-hat.com/name2key
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
01-22-2009 02:00
without testing, the original posted link should work, forgot about the pass through after LL locked down search access from inworld. though through my original testing, having a locked or no profile on record doesn't seem to prevent pulling a page for that av... but something does, as there were a few I found that had open and filled profiles (as verified both inworld, and by grabbing the page by their key) that didn't pop... my guess then (and it still stands) is that it's an issue of indexing. some just aren't... yet?

OP's link posted solution is probably inferior to w-hat right now, but I'm not about to scratch at it right now.. someone else wants to, i'm sure plenty of others would appreciate any findings.

ETA: the posted original link doesn't include some of the advanced search words, possibly it can't, I don't remember all of them, but intitle:XXX was one of the more useful... I believe it was DayOh that posted about the extended search field originally (which IIRC are based on googles)

update: because it bugged me not to remember, hits was the demo link that Day Oh provided oh so long ago
valid categories are similar or the same as inworld search, and some are exposed in the code of the web search portal on secondlife.com
All_Web (well all secondlife anyways ::eyeroll:: )
Classifieds
Events
Groups
People
Places (both regions and parcels are under this)
Wiki
secondlife_com (the webside)

theres a flag for mature content too, but I can't remember it offhand

IIRC there's a specific format that can be used to paste a link into chat that can be clicked to pop the relevant search page IN the search window too, possibly useful for group invites
_____________________
|
| . "Cat-Like Typing Detected"
| . This post may contain errors in logic, spelling, and
| . grammar known to the SL populace to cause confusion
|
| - Please Use PHP tags when posting scripts/code, Thanks.
| - Can't See PHP or URL Tags Correctly? Check Out This Link...
| -
Zena Juran
Registered User
Join date: 21 Jul 2007
Posts: 473
01-22-2009 06:05
Thanx all! Looks like w-hat is still the best way to process Name2key(). :-)
Silverdown Seetan
Registered User
Join date: 22 Aug 2008
Posts: 18
01-23-2009 05:40
To my it a chat commanded, is also told to the owner only.

Example usage: /12 Silverdown Seetan

CODE




string NAME; // name to look up
string URL = "http://w-hat.com/name2key"; // name2key url
integer chan = 12;
key reqid; // http request id

default {
state_entry()
{
llListen(chan,"",llGetOwner(),"");
NAME = "";
// reqid = llHTTPRequest( URL + "?terse=1&name=" +
//llEscapeURL(NAME), [], "" );
}
listen(integer channel, string name, key id, string message)
{

NAME = message;
reqid = llHTTPRequest( URL + "?terse=1&name=" +
llEscapeURL(NAME), [], "" );
}

http_response(key id, integer status, list meta, string body) {
if ( id != reqid )
return;
if ( status == 499 )
llOwnerSay("name2key request timed out");
else if ( status != 200 )
llOwnerSay("the internet exploded!!");
else if ( (key)body == NULL_KEY )
llOwnerSay("No key found for " + NAME);
else
llOwnerSay(NAME + "'s key is: " + body );
}
}