Refactored: use Scene.GetAgentHomeURI() to get the Home URI of a user
parent
f3508649f5
commit
55cc8044cb
|
@ -239,11 +239,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Lure
|
|||
GatekeeperServiceConnector gConn = new GatekeeperServiceConnector();
|
||||
GridRegion gatekeeper = new GridRegion();
|
||||
gatekeeper.ServerURI = url;
|
||||
|
||||
string homeURI = null;
|
||||
AgentCircuitData acd = scene.AuthenticateHandler.GetAgentCircuitData(client.AgentId);
|
||||
if (acd != null && acd.ServiceURLs != null && acd.ServiceURLs.ContainsKey("HomeURI"))
|
||||
homeURI = (string)acd.ServiceURLs["HomeURI"];
|
||||
string homeURI = scene.GetAgentHomeURI(client.AgentId);
|
||||
|
||||
string message;
|
||||
GridRegion finalDestination = gConn.GetHyperlinkRegion(gatekeeper, new UUID(im.RegionID), client.AgentId, homeURI, out message);
|
||||
|
|
|
@ -529,10 +529,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
|||
|
||||
if (reg != null)
|
||||
{
|
||||
string homeURI = null;
|
||||
AgentCircuitData acd = Scene.AuthenticateHandler.GetAgentCircuitData(sp.ControllingClient.AgentId);
|
||||
if (acd != null && acd.ServiceURLs != null && acd.ServiceURLs.ContainsKey("HomeURI"))
|
||||
homeURI = (string)acd.ServiceURLs["HomeURI"];
|
||||
string homeURI = Scene.GetAgentHomeURI(sp.ControllingClient.AgentId);
|
||||
|
||||
string message;
|
||||
finalDestination = GetFinalDestination(reg, sp.ControllingClient.AgentId, homeURI, out message);
|
||||
|
|
|
@ -532,11 +532,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
|||
GatekeeperServiceConnector gConn = new GatekeeperServiceConnector();
|
||||
GridRegion gatekeeper = new GridRegion();
|
||||
gatekeeper.ServerURI = lm.Gatekeeper;
|
||||
|
||||
string homeURI = null;
|
||||
AgentCircuitData acd = Scene.AuthenticateHandler.GetAgentCircuitData(remoteClient.AgentId);
|
||||
if (acd != null && acd.ServiceURLs != null && acd.ServiceURLs.ContainsKey("HomeURI"))
|
||||
homeURI = (string)acd.ServiceURLs["HomeURI"];
|
||||
string homeURI = Scene.GetAgentHomeURI(remoteClient.AgentId);
|
||||
|
||||
string message;
|
||||
GridRegion finalDestination = gConn.GetHyperlinkRegion(gatekeeper, new UUID(lm.RegionID), remoteClient.AgentId, homeURI, out message);
|
||||
|
|
|
@ -2675,6 +2675,18 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
return sp;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the Home URI of the agent, or null if unknown.
|
||||
/// </summary>
|
||||
public string GetAgentHomeURI(UUID agentID)
|
||||
{
|
||||
AgentCircuitData circuit = AuthenticateHandler.GetAgentCircuitData(agentID);
|
||||
if (circuit != null && circuit.ServiceURLs != null && circuit.ServiceURLs.ContainsKey("HomeURI"))
|
||||
return circuit.ServiceURLs["HomeURI"].ToString();
|
||||
else
|
||||
return null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Cache the user name for later use.
|
||||
/// </summary>
|
||||
|
|
Loading…
Reference in New Issue