llMatchGroup

From Second Life Wiki
Revision as of 15:22, 18 January 2012 by Shadow Siamendes (talk | contribs)
Jump to navigation Jump to search
Emblem-important-yellow.png LSL Feature Request
The described function does not exist. This article is a feature request.

Summary

Function: integer llMatchGroup( key group );

This function is a request from several scripters to reach what llDetectedGroup and llSameGroup is not able to provide. It would not cause any security and/or privacy issues due the fact it will return a integer as boolean instead of any information about the group.
Returns an integer boolean, that is TRUE if agent has group as active group, otherwise FALSE

• key group group UUID of the group that is going to match with avatar's active group

Specification

  • Still unknow.

Caveats

  • Still unknow.

Examples

<lsl>key group_key = "cd505f45-a33c-dcd5-eb7e-cad27847a4af"; //Key of some group

default {

   touch_start(integer total_number)
   {
       if (llMatchGroup(group_key) == TRUE) {  //It checks if the agent (avatar) has
                                               // the group of "group_key" as active group
           llSay(0,"You belong to the group secondlife:///app/group/" + (string)group_key + "/about");
       } else {
           llSay(0,"You don't belong to the group secondlife:///app/group/" + (string)group_key + "/about");
       }
   }
}</lsl>

See Also

Functions

•  llDetectedGroup Used in conjunction with detection events
•  llSameGroup

Deep Notes

Signature

//function integer llMatchGroup( key group );

Comments

"A function, tentatively titled llMatchGroup(), which takes two parameters: an agent/object key and a group key, and returns a boolean result. (e.g. integer llMatchGroup(key target, key group); ) The function simply checks "target"'s active group against the key "group", returns a 1 if the two match and returns a 0 if they do not. For the purposes this is intended to cover it would only need to work for targets located within the same sim. (Though it would be nice if it could check targets 96m within adjacent sims, a la llGetObjectDetails().)

I believe this function would satisfy both needs for the most part; it would allow scripters to set up multi-group authorization systems, but would not allow them to potentially breach resident privacy by in essence "fishing" for group information as implementing SVC-1612 would allow. Any scripts using it would have to know the key of the group in advance to get any meaningful information out of this.

It should also be noted that this functionality is strongly desired, to the point where designers use rather complex methods to accomplish this despite the heavy overhead required. I've seen a few security/etc. setups where the system relied on multiple objects set to different groups, each using llSameGroup() within intercommunicating scripts in order to allow multiple-group access checking. Implementing this would allow developers to use self-contained scripts to accomplish the same thing."[1]