• All submissions to this site are governed by Second Life Project Contribution Agreement. By submitting patches and other information using this site, you acknowledge that you have read, understood, and agreed to those terms.
Issue Details (XML | Word | Printable)

Key: SVC-215
Type: New Feature New Feature
Status: Open Open
Priority: Critical Critical
Assignee: Unassigned
Reporter: Haravikk Mistral
Votes: 177
Watchers: 33
Operations

If you were logged in you would be able to see more operations.
2. Second Life Service - SVC

llRequestAgentKey (llName2Key)

Created: 20/May/07 08:59 AM   Updated: 30/Sep/09 01:32 PM
Return to search
Component/s: Scripts
Affects Version/s: 1.21.0 Server, 1.22.1 Server, 1.22.2 Server, 1.22.3 Server, 1.22.4 Server, 1.23.4 Server, 1.24 Server, 1.25 Server, 1.26 Server, 1.27 Server, 1.30 Server
Fix Version/s: None

Issue Links:
Duplicate
 
Relates
 


 Description  « Hide
key llRequestAgentKey(string name);

PARAMS:
name - the name you wish to retrieve a key-for

RETURNS:
A key to be used with the dataserver() event (this is NOT the key for the avatar).
The contents of the dataserver() event will be a string representation of a key, once cast to a key this will either be the key for the agent name provided, or NULL_KEY if the agent was not found.

I really don't see why we don't already have this, especially when it is fairly easy to do, evidenced by the number of good name-to-key databases out there. However, retrieving avatar keys using these sites is slow and potentially fail (as none of them give guaranteed access). Even if the information is distributed in such a way (by key) that this may difficult to do with the current system, a database of names to keys doesn't have that high a demand and could easily be created on LL's end, and added to as new accounts sign-up. It will make it a LOT easier to make more efficient and more user-friendly scripts.

It's one thing to use outside databases for storing your own data, but to have to use them to store LL's data is a bit backwards!

Link to Wiki pages for this feature
https://wiki.secondlife.com/wiki/LlName2Key



 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
Smiley Barry added a comment - 21/May/07 11:10 AM
Hmm, a nice change would be making it like llKey2Name and llGetOwner that don't trigger the dataserver event. Like

if (llKey2Name(llGetOwner())==llGetCreator())

and not:

llName2Key("Someone Somebody");


Lex Neva added a comment - 21/May/07 11:44 AM
Due to the way SL is built, it's almost certain that a function like this would have to be implemented asynchronously as Haravikk suggests. That said, it'd be a whole HECK of a lot better than not having this function at all! LL already has the database that they'd need for this, and the client can query it using the find system. The libsecondlife folks made a program that logs in and does name2key requests using find.

Haravikk Mistral added a comment - 22/May/07 02:52 AM
I agree that it would sweet to have it as llKey2Name(), but I think even if they use the same search functionality it would still ultimately be a dataserver() based request, as anything that can't be fetched instantaneously can't really be made into a standard function as the results simply aren't available at the time it's called.

WarKirby Watanabe added a comment - 30/May/07 01:34 AM
using the dataserver, or an external database. meh.

I duppose the dataserver might be a bit faster, but it's still not going to be instant.

I think it would be more useful to have a limited function, that would rerturn the key instantly if the target is in the same sim. Like llKey2Name does.


Haravikk Mistral added a comment - 13/Jun/07 10:58 AM
Hmm, hadn't thought about same-simulator cases. Certainly for scanners and things it would be more useful, and the search shouldn't be too hard as at most simulators don't seem to allow more than 100 or so avatars in at any one time.

In that event I would go for both, dataserver/llRequestAgentKey() would still be MUCH faster and hopefully more reliable than external sources, plus up-to-date, so I wouldn't discount it entirely =P


Strife Onizuka added a comment - 13/Jun/07 02:16 PM
I like the feature suggestion as is. Using the dataserver event is reasonable considering that it might have to fetch the data from the userserver. This functions should probably have some energy requirements.

Angel Fluffy added a comment - 22/Jul/07 11:08 PM
Linking to this from the privacy/security meta-issue as this would make life vastly easier for third party security systems like SLBanLink.com, not to mention its obvious application for vendors, mailers, etc.

Travis Lambert added a comment - 24/Sep/07 08:22 AM
While I'd be perfectly happy with a dataserver event to return this information - I have a feeling that due to the perpetual Mono implementation, new LSL functionality to provide this data isn't on the horizon anytime soon.

If the above is accurate - there's another way to skin this cat without involving any changes to LSL: Make us a Web API to return key information, and have it be queried via HTTPRequest (or an external DB, for that matter).

This would nullify the need for (inaccurate) 3rd Party Databases, and we could query the source instead for reliable key info. I'd think this would be several orders of magnitude easier to implement than changes to the LSL infrastructure.


Haravikk Mistral added a comment - 30/Oct/07 07:35 AM
LL did however add llGetObjectDetails() not too long ago, it should be do-able internally. The overhead of using llHTTPRequest() for such calls is a bit high, not to mention fairly complex.

Really all that needs added in LSL is a function hook, since ultimately the processing will be handed over to the simulator to do the actual requesting. The simulator part will not change when Mono comes out (eventually). So as far as SL is concerned it's just another function.


TigroSpottystripes Katsu added a comment - 01/Jan/08 11:13 PM
I thought it would be the other way around, the system that compiles and runs the scripts would be improved, but at first lsl would remain the same......

eggy lippmann added a comment - 18/May/08 11:27 AM
I was wondering if you've noticed http://secondlife.com/app/search/search_proxy.php
You can do a name2key lookup with it.

http://secondlife.com/app/search/search_proxy.php?q=Eggy%20Lippmann
First link contains my key.


Ezian Ecksol added a comment - 19/May/08 04:36 AM
@eggy: That solution has to call even 2 times llHTTPrequest, so code is more complicated and slower than the current web solutions. Additionaly, one can prevent to be found by the SL search, so it could be possible that this solutions doesn't deliver a key.

I would really appreciate LL to give us a built-in function to get the key for an agent name.


Stephen Psaltery added a comment - 29/May/08 08:42 PM - edited
Second Edit: Unfortunately it seems SL now prevents HTTP requests from sims from reaching this web service. They explicitly block internal connections. I say this is a travesty more than anything else. At any rate, this can be written as a simple webservice which can be hosted on any web server. If anyone needs help with a script for their webserver that performs this function, IM me in world.

Actually, you only need to do one HTTPrequest call. If you view the source of the resultant page, the key is displayed on the search. When you search for an av name that exists, the "View resident profile" link appears, which contains the residents key EVEN if they are set not to show in search and/or dont have payment info used.

This block of text:
<div>
<p class="g">
<img src="http://world.secondlife.com/images/person.png" /><a href="secondlife:///app/agent/24556873-3005-41a5-a2b4-01a22ffa84c0/about">Resident profile: Eggy Lippmann</a><p>
</p>
</div>

Simply check for the substring "Resident profile: " If you find that, then the name you searched for DOES exist. For the key, look at the end of the URL after app/agent/

This yields the key 24556873-3005-41a5-a2b4-01a22ffa84c0, which is indeed eggy's key.

So ONE http request, then you llSubStringIndex(body, "Resident Profile:") if that's not -1, then that resident exists, then you integer key_position = llSubStringIndex(body, "secondlife:///app/agent/") + 24; key target_key = (key)llGetSubString(body,key_position,key_position + 35);

VOILA target_key is now the key of the name you queried.

Is it perfect? No. Does it work RIGHT NOW? Yes. Is it difficult? Not really.

I'm COMPLETELY for this function being implemented as described in this issue, BUT for everyone who wants that functionality RIGHT NOW with only a little more work and annoyance, use my code above. I wrote it pretty hastily. If you want a working example, IM me in-world and I'll whip something up.

Edit: Lack Of Sleep = no semicolons. =P Also, to clarify - this resident profile thing ALWAYS appears first when the name is successfully found to be a resident. That's why we can llSubStringIndex for "secondlife:///app/agent/" without any offsets. It will ALWAYS be the first one you hit provide the "Resident profile:" is found.


seshat czeret added a comment - 14/Sep/08 12:00 AM
I can see it as possible that this isn't implemented as a kind of anti-griefing measure. With it, it would be trivially easy for Joe Griefer to pick a surname, obtain the list of avs with that surname, then plug the keys into their malicious script-of-the-day.

Without it, that task is a tiny bit harder. Not much, but it doesn't take much to deter the lazier sort of griefer.

The question is: is the lack of this function more useful as an anti-griefing tool, than it is a pain in the butt for honest scripters?

Myself, I'd put in an intentional delay, or a cap on the number of calls by any one script per unit time, or a 'grey goo fence', or some similar effect. That would be a minor inconvenience for honest scripters, and would greatly reduce its utility as a griefing tool.


Harleen Gretzky added a comment - 14/Sep/08 01:17 AM
Just use another search engine, like Google as sort of a proxy.

For instance, for your URL use: http://www.google.com/search?hl=en&q=site:world.secondlife.com+Resident%2BName

Then search for http://world.secondlife.com/resident/ the avatar key follows this.


Haravikk Mistral added a comment - 14/Sep/08 04:26 AM
Seshat, it wouldn't really be possible to do a surname search as you're suggesting. This proposal is for a direct llName2Key, so you would need to know the avatar's full-name in order to get their key. If you wanted to go by surname you'd have to guess first-names which isn't very easy.

seshat czeret added a comment - 26/Sep/08 12:39 PM
Haravikk:
I spoke a bit carelessly. I didn't mean that llName2Key will give you a list of avs, just that once you have such a list, you can use llName2Key to directly do a bunch of things to avs that you would have to work a little bit harder to do without it. But not much harder.
(BTW: Search->People, fill in a surname. Obtain a list of first names.)

My main point was that I can think of reasons that omitting llName2Key may have been an anti-griefing decision. But I think it's past time to rethink that decision.

Anyone who's a competent scripter can work around its absence enough to grief random people; but the workarounds aren't enough to make a fully reliable gift vendor (since gift vendors are trying to llGiveInventory to specific people). So we have the rather strange situation that it's actually easier to grief than to perform a legitimate task.


Mirella Dallagio added a comment - 26/Sep/08 02:41 PM
As an anti griefer measure, it would be completelyl useless.
Either you have a griefer/spammer that targets you specifically - in this case there are tons of ways to obtain your UUID, or you have someone working on the numbers. And they don't care who they hit. They just need a long list of UUIDs, as they are ANYWAY available by a number of means.

Let's face it. The lack of a decent Name to UUID lookup just harasses who might make legitimate use of it.


Ezian Ecksol added a comment - 01/Jul/09 04:05 AM
Waking this old thread up ... what's up with a llRequestAgentKey now?

We all are using w-hat etc. for long time now, no problems, lot of scripts have a legitimate use for it.

Why not eventually implement this into SL, to make us independent from 3rd party databses?


Arete Diplomat added a comment - 30/Jul/09 04:06 PM
When I first thought about the need for llName2Key, I understood that the difficulty would be that a name might be entered that is not unique--like an object or script name, where a number of different objects/scripts in-world might have the same name. However, when we're talking about avatars or groups, duplicates are not possible.

It is also true that UUIDs can be captured through detection and/or sensor events. Any avatar/group UUID that is needed can be found. It isn't like it is secret information to which scripters should never have access.

That is why I'm confused as to why this function is not available. Yes, there are third-party databases--but why should we have to rely on those? And why should we have to include the lengthier code required to access those databases, when the information is available? What's wrong with providing scripters with quick access to information that they can retrieve in other ways which is more costly, in terms of system resources?

I would also add that this would be good as an llGetAgentUUID or llGetGroupUUID command ... or it could be included as information retrievable via llGetAgentInfo. There are several ways that it could be incorporated--all of which would be easier, for the scripter as well as for system resources, than the hoops through which we currently find ourselves jumping.


AnnMarie Otoole added a comment - 04/Aug/09 11:39 PM
What a disaster.

In order to determine the UUID of group members I have to scan my sim from multiple places once a minute and once for each name in the group list (that has not previously been documented), just to complete the UUID list.

The llName2Key would save tens of thousands of region scans per day for information that should be readily available.