From f1b9ff6b4b9bd96c7193a0dd7ed4c79016355729 Mon Sep 17 00:00:00 2001 From: diva Date: Sat, 3 Jan 2009 16:18:20 +0000 Subject: Fixed logic for sending foreign user information (HG). --- .../Communications/Hypergrid/HGGridServices.cs | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/Communications/Hypergrid/HGGridServices.cs b/OpenSim/Region/Communications/Hypergrid/HGGridServices.cs index fc68ba2..0874676 100644 --- a/OpenSim/Region/Communications/Hypergrid/HGGridServices.cs +++ b/OpenSim/Region/Communications/Hypergrid/HGGridServices.cs @@ -893,20 +893,31 @@ namespace OpenSim.Region.Communications.Hypergrid public bool SendUserInformation(RegionInfo regInfo, AgentCircuitData agentData) { CachedUserInfo uinfo = m_userProfileCache.GetUserDetails(agentData.AgentID); - if ((uinfo == null) || !IsGoingHome(uinfo, regInfo)) + + if ((IsLocalUser(uinfo) && IsHyperlinkRegion(regInfo.RegionHandle)) || + (!IsLocalUser(uinfo) && !IsGoingHome(uinfo, regInfo))) { - m_log.Info("[HGrid]: User seems to be going to foreign region " + uinfo.UserProfile.FirstName + " " + uinfo.UserProfile.SurName); + m_log.Info("[HGrid]: Local user is going to foreign region or foreign user is going elsewhere"); if (!InformRegionOfUser(regInfo, agentData)) { m_log.Warn("[HGrid]: Could not inform remote region of transferring user."); return false; } } - else - m_log.Info("[HGrid]: User seems to be going home " + uinfo.UserProfile.FirstName + " " + uinfo.UserProfile.SurName); + //if ((uinfo == null) || !IsGoingHome(uinfo, regInfo)) + //{ + // m_log.Info("[HGrid]: User seems to be going to foreign region."); + // if (!InformRegionOfUser(regInfo, agentData)) + // { + // m_log.Warn("[HGrid]: Could not inform remote region of transferring user."); + // return false; + // } + //} + //else + // m_log.Info("[HGrid]: User seems to be going home " + uinfo.UserProfile.FirstName + " " + uinfo.UserProfile.SurName); // May need to change agent's name - if (IsLocalUser(uinfo)) + if (IsLocalUser(uinfo) && IsHyperlinkRegion(regInfo.RegionHandle)) { agentData.firstname = agentData.firstname + "." + agentData.lastname; agentData.lastname = "@" + serversInfo.UserURL.Replace("http://", ""); ; //HGNetworkServersInfo.Singleton.LocalUserServerURI; -- cgit v1.1