Ejemplo n.º 1
0
        public override void Groups_OnGroupRolesMembers(object sender, GroupRolesMembersReplyEventArgs e)
        {
            var      groupID = e.GroupID;
            SimGroup g       = DeclareGroup(groupID);

            if (MaintainGroupMetaData)
            {
                MetaDataQueue.Enqueue(() =>
                {
                    foreach (var list in e.RolesMembers)
                    {
                        SimGeneric declareGeneric = DeclareGroupRole(groupID, list.Key);
                        if (list.Value != UUID.Zero)
                        {
                            SimAvatarImpl a = DeclareAvatarProfile(list.Value);
                            a.AddGroupRole(groupID, list.Key);
                            a.AddInfoMapItem(new NamedParam("simMemberRole",
                                                            declareGeneric));
                            SendOnUpdateDataAspect(a, "MemberRole", null, null);
                        }
                    }
                    if (g != null)
                    {
                        SendOnUpdateDataAspect(g, "Members", null, null);
                    }
                });
            }
            // base.Groups_OnGroupRolesMembers(requestID, groupID, rolesMembers);
        }
Ejemplo n.º 2
0
        public static SimGeneric DeclareGeneric(string genericName, UUID uuid, string moreInfo)
        {
            if (uuid == UUID.Zero)
            {
                return(null);
            }
            object     g;
            SimGeneric sg = null;

            if (UUIDTypeObjectTryGetValue(uuid, out g))
            {
                if (g is SimGeneric)
                {
                    return(g as SimGeneric);
                }
            }

            lock (UUIDTypeObjectLock)
            {
                if (UUIDTypeObjectTryGetValue(uuid, out g))
                {
                    if (g is SimGeneric)
                    {
                        return(g as SimGeneric);
                    }

                    if (g != null)
                    {
                        string issue = moreInfo + " " + genericName + " " + uuid + " is really a  " + g.GetType().Name + ": " + g;
                        //throw new AbandonedMutexException(issue);
                        if (!(g is Type))
                        {
                            Debug(issue);
                            return(null);
                        }
                        sg = (SimGeneric)(UUIDTypeObjectSetValue(uuid, new SimGeneric(genericName, uuid)
                        {
                            Value = g
                        }));
                        return(sg);
                    }
                }
                sg = (SimGeneric)(UUIDTypeObjectSetValue(uuid, new SimGeneric(genericName, uuid)));
                return(sg);
            }
        }
Ejemplo n.º 3
0
        public override void Groups_OnGroupRoles(object sender, GroupRolesDataReplyEventArgs e)
        {
            var groupID = e.GroupID;

            DeclareGroup(groupID);
            if (!MaintainGroupMetaData)
            {
                return;
            }
            MetaDataQueue.Enqueue(() =>
            {
                foreach (var list in e.Roles)
                {
                    GroupRole value           = list.Value;
                    SimGeneric declareGeneric = DeclareGroupRole(groupID, list.Key);
                    declareGeneric.Value      = value;
                    SendOnUpdateDataAspect(declareGeneric, "GroupRole", null, value);
                    //a.AddInfoMap(new NamedParam("memberRole"))
                }
            });
        }