Exemple #1
0
        private void OnDenyFriendRequest(IClientAPI client, UUID agentID, UUID friendID, List <UUID> callingCardFolders)
        {
            MainConsole.Instance.DebugFormat("[FRIENDS]: {0} denied friendship to {1}", agentID, friendID);


            FriendInfo[] friends = FriendsService.GetFriendsRequest(agentID).ToArray();
            foreach (FriendInfo fi in friends)
            {
                if (fi.MyFlags == 0)
                {
                    UUID fromAgentID;
                    if (!UUID.TryParse(fi.Friend, out fromAgentID))
                    {
                        continue;
                    }
                    if (fromAgentID == friendID) //Get those pesky HG travelers as well
                    {
                        FriendsService.Delete(agentID, fi.Friend);
                    }
                }
            }
            FriendsService.Delete(friendID, agentID.ToString());

            //
            // Notify the friend
            //

            // Try local
            if (LocalFriendshipDenied(agentID, client.Name, friendID))
            {
                return;
            }
            SyncMessagePosterService.PostToServer(SyncMessageHelper.FriendshipDenied(
                                                      agentID, client.Name, friendID, m_scene.RegionInfo.RegionID));
        }
Exemple #2
0
        private void OnDenyFriendRequest(IClientAPI client, UUID agentID, UUID friendID, List <UUID> callingCardFolders)
        {
            m_log.DebugFormat("[FRIENDS]: {0} denied friendship to {1}", agentID, friendID);

            FriendsService.Delete(agentID, friendID.ToString());
            FriendsService.Delete(friendID, agentID.ToString());

            //
            // Notify the friend
            //

            // Try local
            if (LocalFriendshipDenied(agentID, client.Name, friendID))
            {
                return;
            }

            UserInfo friendSession = m_Scenes[0].RequestModuleInterface <IAgentInfoService>().GetUserInfo(friendID.ToString());

            if (friendSession != null && friendSession.IsOnline)
            {
                GridRegion region = GridService.GetRegionByUUID(m_Scenes[0].RegionInfo.ScopeID, friendSession.CurrentRegionID);
                AsyncMessagePostService.Post(region.RegionHandle, SyncMessageHelper.FriendshipDenied(
                                                 agentID, client.Name, friendID, region.RegionHandle));
            }
        }
Exemple #3
0
        private void OnDenyFriendRequest(IClientAPI client, UUID agentID, UUID friendID, List <UUID> callingCardFolders)
        {
            MainConsole.Instance.DebugFormat("[FRIENDS]: {0} denied friendship to {1}", agentID, friendID);

            FriendsService.Delete(agentID, friendID.ToString());
            FriendsService.Delete(friendID, agentID.ToString());

            //
            // Notify the friend
            //

            // Try local
            if (LocalFriendshipDenied(agentID, client.Name, friendID))
            {
                return;
            }
            SyncMessagePosterService.Post(SyncMessageHelper.FriendshipDenied(
                                              agentID, client.Name, friendID, m_Scenes[0].RegionInfo.RegionHandle),
                                          m_Scenes[0].RegionInfo.RegionHandle);
        }