Jump to content

Any better way to get the name from a group key ?


Qie Niangao
 Share

You are about to reply to a thread that has been inactive for 3199 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

In the past I've pretty-printed mouseable group names to chat history using the viewer URI formatting as described in the wiki, but now I want the simple raw text name, for which that wiki article says no LSL function exists. I'm wondering if there's some commonly used solution instead of the following kruft I just kludged-up:

key groupKey = "dc7b21cd-3c89-fcaa-31c8-25f9ffd224cd";

default
{
    state_entry()
    {
        llHTTPRequest("http://world.secondlife.com/group/"+(string)groupKey, [], "");
    }
    http_response(key request_id, integer status, list metadata, string body)
    {
        llOwnerSay(
            llGetSubString(
                body,
                llSubStringIndex(body, "<title>") +7,
                llSubStringIndex(body, "</title>") -1
                )
            );
    }
}
Link to comment
Share on other sites

Sigh. I guess we were never guaranteed that everything gets a "world" page. For example:

http://world.secondlife.com/group/47fa1deb-97b9-ca0e-173b-bce497ba34f9

throws a 404. Meanwhile

secondlife:///app/group/47fa1deb-97b9-ca0e-173b-bce497ba34f9/inspect

in the viewer shows it was once known as "Second Life Mentor" as it appears on associated "About Land" although the group has no profile -- and there's a completely different group with the exact same name to be found in Search.

(This all just in case anybody else tries this; some special handling required for weird rare conditions.)

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 3199 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...