예제 #1
0
 public void UpdateCachedData(UUID agentID, CachedUserInfo cachedInfo)
 {
     //Update the cache
     RemoveFromGroupPowersCache(agentID, UUID.Zero);
     m_cachedGroupTitles[agentID] = cachedInfo.ActiveGroup;
     m_cachedGroupMemberships[agentID] = cachedInfo.GroupMemberships;
 }
        private void CacheUserInfo(IScene scene, CachedUserInfo cache)
        {
            if (cache == null) return;
            IAgentConnector conn = Framework.Utilities.DataManager.RequestPlugin<IAgentConnector>();
            if (conn != null)
                conn.CacheAgent(cache.AgentInfo);
            scene.UserAccountService.CacheAccount(cache.UserAccount);

            scene.EventManager.TriggerOnUserCachedData(cache.UserAccount.PrincipalID, cache);
        }
예제 #3
0
        private bool CreateAgent(GridRegion region, IRegionClientCapsService regionCaps, ref AgentCircuitData aCircuit,
            ISimulationService SimulationService, List<UUID> friendsToInform, out CreateAgentResponse response)
        {
            CachedUserInfo info = new CachedUserInfo();
            IAgentConnector con = Framework.Utilities.DataManager.RequestPlugin<IAgentConnector>();
            if (con != null)
                info.AgentInfo = con.GetAgent(aCircuit.AgentID);
            info.UserAccount = regionCaps.ClientCaps.AccountInfo;

            IGroupsServiceConnector groupsConn = Framework.Utilities.DataManager.RequestPlugin<IGroupsServiceConnector>();
            if (groupsConn != null)
            {
                info.ActiveGroup = groupsConn.GetGroupMembershipData(aCircuit.AgentID, UUID.Zero, aCircuit.AgentID);
                info.GroupMemberships = groupsConn.GetAgentGroupMemberships(aCircuit.AgentID, aCircuit.AgentID);
            }

            IOfflineMessagesConnector offlineMessConn =
                Framework.Utilities.DataManager.RequestPlugin<IOfflineMessagesConnector>();
            if (offlineMessConn != null)
                info.OfflineMessages = offlineMessConn.GetOfflineMessages(aCircuit.AgentID);

            IMuteListConnector muteConn = Framework.Utilities.DataManager.RequestPlugin<IMuteListConnector>();
            if (muteConn != null)
                info.MuteList = muteConn.GetMuteList(aCircuit.AgentID);

            IAvatarService avatarService = m_registry.RequestModuleInterface<IAvatarService>();
            if (avatarService != null)
                info.Appearance = avatarService.GetAppearance(aCircuit.AgentID);

            info.FriendOnlineStatuses = friendsToInform;
            IFriendsService friendsService = m_registry.RequestModuleInterface<IFriendsService>();
            if (friendsService != null)
                info.Friends = friendsService.GetFriends(aCircuit.AgentID);

            aCircuit.CachedUserInfo = info;
            return SimulationService.CreateAgent(region, aCircuit, aCircuit.TeleportFlags,
                                                 out response);
        }
 void UpdateCachedInfo (UUID agentID, CachedUserInfo info)
 {
     lock (m_offlineMessagesCache)
         m_offlineMessagesCache [agentID] = info.OfflineMessages;
 }
예제 #5
0
 /// <summary>
 ///     Deserialize the module from OSD
 /// </summary>
 /// <param name="map"></param>
 public override void FromOSD(OSDMap map)
 {
     AgentID = map["AgentID"];
     IsChildAgent = map["IsChildAgent"];
     CircuitCode = map["CircuitCode"];
     SecureSessionID = map["SecureSessionID"];
     SessionID = map["SessionID"];
     IPAddress = map["IPAddress"];
     RegionUDPPort = map["RegionUDPPort"];
     StartingPosition = map["StartingPosition"];
     TeleportFlags = map["TeleportFlags"];
     if (map.ContainsKey("CachedUserInfo"))
     {
         CachedUserInfo = new CachedUserInfo();
         CachedUserInfo.FromOSD((OSDMap)map["CachedUserInfo"]);
     }
 }
예제 #6
0
 private void UpdateCachedInfo(UUID agentID, CachedUserInfo info)
 {
     lock (MuteListCache)
         MuteListCache[agentID] = info.MuteList.ToArray();
 }
 void UpdateCachedInfo(UUID agentID, CachedUserInfo info)
 {
     lock (m_FriendOnlineStatuses)
     {
         if (info.FriendOnlineStatuses.Count > 0)
             m_FriendOnlineStatuses [agentID] = info.FriendOnlineStatuses;
         else
             m_FriendOnlineStatuses.Remove (agentID);
     }
     lock (m_Friends)
         m_Friends [agentID] = info.Friends;
 }