Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Group keys to owner names

Jackson Rickenbacker
Registered User
Join date: 8 Oct 2006
Posts: 601
05-19-2007 23:25
we need a way to pull a group name out of a UUID key, instead of a null key.. this is totally botched and surely you have known about the problem long enough to do something about it..

We need to be able to pull a group name from a UUID
Draco18s Majestic
Registered User
Join date: 19 Sep 2005
Posts: 2,744
05-20-2007 11:38
*cough*groups can have mutiple owners*/cough*

...and the creator can leave...

Though I would be happy if llKey2Name(groupKey) returned the name of the group.
Haravikk Mistral
Registered User
Join date: 8 Oct 2005
Posts: 2,482
05-20-2007 12:43
From: Draco18s Majestic
Though I would be happy if llKey2Name(groupKey) returned the name of the group.

Agreed, it would at least be more useful. The question though is if that information would be available and when, as group info isn't fully loaded by a simulator unless someone belonging to that group is in the simulator (as current permissions don't need to know anything about the group for non-members, if you're not in it then you won't have a matching key, and you can be blocked as a result).

I think more likely this would need to be handled by an llRequestGroupData() call, which (in the same way as llRequestAgentData) allows you to request information on the group, such as the name.

This means that to get information you'd have to call llRequestAgentData (to be sure you get a result even if the avatar left the simulator) and try llRequestGroupData as well if you got a null result.
_____________________
Computer (Mac Pro):
2 x Quad Core 3.2ghz Xeon
10gb DDR2 800mhz FB-DIMMS
4 x 750gb, 32mb cache hard-drives (RAID-0/striped)
NVidia GeForce 8800GT (512mb)
Jackson Rickenbacker
Registered User
Join date: 8 Oct 2006
Posts: 601
05-20-2007 19:43
Thing is when all esate owners that allow parceled to be "purchased" people set the land o group, when we scan the land it returns a null key and the scan results just as "group" land, well thats ok if you have 1 or 2 sims, but when your running 10, 20, 50 sims, its just ridiculous to have to manually look at each peice of land, spread all over the sim looking for the group name...

I'd be happy with a group name myself, thats all that would be needed
Jackson Rickenbacker
Registered User
Join date: 8 Oct 2006
Posts: 601
05-21-2007 21:25
Please if your so inclined, give a few votes to the proposal

http://secondlife.com/vote/vote.php?get_id=3298
Haravikk Mistral
Registered User
Join date: 8 Oct 2005
Posts: 2,482
05-22-2007 02:24
That's what I'm saying, I don't think that technically it's possible to have it return a group-name automatically for the group key, as that information isn't available.

You see, llKey2Name() only returns results for things present in the simulator, which typically groups aren't (they're only loaded when someone belonging to that group enters), so it's only useful for checking avatars and objects that are in the same simulator as your script.

llRequestAgentData() is the way to retrieve a name without worrying about the person being present or not, however it presumably queries whatever servers are responsible for storing agent information, so group info won't be available to these, and having them check automatically might be unneccessary extra load.

Thus an llRequestGroupData() would be useful, as it would instead query the servers responsible for storing group information, and retrieve only a name from them (though other data could come later).
In this case your script would look something like:

CODE
key avKey;
key groupKey;

default {
state_entry() {
key id = llGetLandOwnerAt(llGetPos());
avKey = llRequestAgentData(id, DATA_NAME);
groupKey = llRequestGroupData(id, DATA_NAME);
}

dataserver(key id, string data) {
if ((data != "") && // We don't currently get blank results, but just in case...
(id == avKey) || (id == groupKey)))
llOwnerSay("Owner is "+data);
}
}

Note that both are done at the same time because unfortunately there is no feedback if llRequestAgentData() fails, so there is no indication if the land in question is group-owned or not, so you'd either just check both and go with whichever one gives you a result, or try agent data, and wait a while, if you get no result in a short period then you assume that it isn't agent-owned and tried group data instead.
_____________________
Computer (Mac Pro):
2 x Quad Core 3.2ghz Xeon
10gb DDR2 800mhz FB-DIMMS
4 x 750gb, 32mb cache hard-drives (RAID-0/striped)
NVidia GeForce 8800GT (512mb)