W-Hat
postcardscontact
faq
To make looking up keys with a script easier, if you add terse=1
to the URL, the response will contain only the key you asked for. If it was not found,
it will return NULL_KEY. Example script:
string NAME = "Masakazu Kojima"; // name to look up
string URL = "http://w-hat.com/name2key"; // name2key url
key reqid; // http request id
default {
state_entry() {
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 );
}
}
(2007-02-28)
There is no reason to worry about somebody else having your key. For a more complete discussion about it, and the reasoning behind the omission of an opt-out feature, please see this thread.
Someone who wanted keys to spam with notecards or IMs could get thousands of names in a day with a sensor object in a popular sim. It'd also have the advantage that they know the people they pick up are still actually playing, and they could target areas related to what they're trying to promote. They'd also be banned, because spamming is unacceptable. If someone is spamming you, file an abuse report; it doesn't matter how they got your key.
Some people use a key database to send product updates to their customers, and someone is using one to develop a way of sending IMs from outside of Second Life. These days, many people sell vendors and other gadgets that rely on this database to make it easier to, for instance, set up profit splitting or send gifts.
Sorry. Try searching for old names they might have had.
You can also look up keys yourself using the Second Life client. First, enable the debug menu (ctrl+alt+d), and use it to turn on the Debug Console (ctrl-shift-4, or Client -> Consoles -> Debug Console). Search for the person using Find, and then hit Instant Message. A message will come up in the debug console following the form:
INFO: LLTalkView::createFloater: target (user key) in (session key)
You can then copy the key into the box below to add it to the database. See below for more ways you can contribute to the database.
Black Clan - New database that uses SL search to find missing names.
Vision Tech - New database from Vision Tech. Not sure how many keys are in it, but it is apparently tied to some in-world magic that looks up missing ones when you ask for them.
KDC's database - Kyrah Abattoir's database. Has some keys that w-hat does not. Supports queries from scripts.
DOWN Moopf Murray's database imports the keys from this database and others daily, and supports queries by email.
DOWN Ulrika's database is the original, and has an opt-out feature, but it is very small and usually down.
DOWN GridFlow Technologies - Has a bot you can instant message to look up keys, and offers web lookups for a fee.
libopenmetaverse, a library for interfacing with the Second Life protocol, comes with a name2key application as an example.
Note: name.cache files from recent versions of Second Life can be pasted directly into the box below. If you get an error when you upload yours, try that instead.
C:\Documents And Settings\(your name)\Application Data\Second Life\cache\name.cache
You can copy and paste keys into this field, one per line, to add them to the database. You don't have to worry about the formatting too much, it will try to find the key on each line and skip any lines that don't have one.
Here is a sensor script you can use to add keys to the database:
// set to TRUE if you want a message every time keys are submitted
integer ANNOUNCE_SEND = FALSE;
// delay in seconds between scanning (keep it at least 30 or you
// may be banned from the site and LL will beat you up)
float SCAN_INTERVAL = 60;
integer keys_sent = 0;
integer keys_new = 0;
key reqid = NULL_KEY;
list last_scan = [];
default {
state_entry() {
llSensorRepeat( "", NULL_KEY, AGENT, 96, PI, SCAN_INTERVAL );
}
on_rez(integer param) { llResetScript(); }
sensor(integer num) {
list submit;
list all;
key k;
while ( num-- ) {
all += (k = llDetectedKey(num));
if ( llListFindList( last_scan, [k] ) == -1 )
submit += k;
}
if ( submit == [] )
return;
last_scan = all;
keys_sent += llGetListLength(submit);
reqid = llHTTPRequest( "http://w-hat.com/name2key",
[HTTP_METHOD, "POST"],
"keys=" + llDumpList2String(submit, "\n") );
}
http_response(key id, integer status, list meta, string body) {
if ( id != reqid )
return;
integer x = llSubStringIndex( body, "new keys." );
if ( x != -1 ) {
string s = llGetSubString( body, x - 3, x + 8 );
if ( s != "No new keys." ) {
keys_new += (integer)s;
if ( ANNOUNCE_SEND )
llOwnerSay( s + " | Total: " +
(string)keys_new +
"/" + (string)keys_sent );
}
}
}
touch_start(integer num) {
if ( llDetectedKey(0) == llGetOwner() )
llOwnerSay( "New/Sent: " + (string)keys_new +
"/" + (string)keys_sent );
}
}