From 22a85b947a16074525343a56203211806ce16834 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Thu, 29 Mar 2012 01:26:30 +0100 Subject: Add back parts of reverted changes that were not concerned with child agent caching. This adds ScenePresence to IClientAPI.SceneAgent earlier on in the add client process so that its information is available to EventManager.OnNewClient() and OnClientLogin() Also add a code comment as to why we're caching friend information for child agents. --- OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'OpenSim/Region/CoreModules/Avatar') diff --git a/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs b/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs index aadd3bc..0c83679 100644 --- a/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs @@ -261,6 +261,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends client.OnTerminateFriendship += (thisClient, agentID, exfriendID) => RemoveFriendship(thisClient, exfriendID); client.OnGrantUserRights += OnGrantUserRights; + // We need to cache information for child agents as well as root agents so that friend edit/move/delete + // permissions will work across borders where both regions are on different simulators. + // // Do not do this asynchronously. If we do, then subsequent code can outrace CacheFriends() and // return misleading results from the still empty friends cache. // If we absolutely need to do this asynchronously, then a signalling mechanism is needed so that calls -- cgit v1.1