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();
|
GatekeeperServiceConnector gConn = new GatekeeperServiceConnector();
|
||||||
GridRegion gatekeeper = new GridRegion();
|
GridRegion gatekeeper = new GridRegion();
|
||||||
gatekeeper.ServerURI = url;
|
gatekeeper.ServerURI = url;
|
||||||
|
string homeURI = scene.GetAgentHomeURI(client.AgentId);
|
||||||
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 message;
|
string message;
|
||||||
GridRegion finalDestination = gConn.GetHyperlinkRegion(gatekeeper, new UUID(im.RegionID), client.AgentId, homeURI, out 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)
|
if (reg != null)
|
||||||
{
|
{
|
||||||
string homeURI = null;
|
string homeURI = Scene.GetAgentHomeURI(sp.ControllingClient.AgentId);
|
||||||
AgentCircuitData acd = Scene.AuthenticateHandler.GetAgentCircuitData(sp.ControllingClient.AgentId);
|
|
||||||
if (acd != null && acd.ServiceURLs != null && acd.ServiceURLs.ContainsKey("HomeURI"))
|
|
||||||
homeURI = (string)acd.ServiceURLs["HomeURI"];
|
|
||||||
|
|
||||||
string message;
|
string message;
|
||||||
finalDestination = GetFinalDestination(reg, sp.ControllingClient.AgentId, homeURI, out message);
|
finalDestination = GetFinalDestination(reg, sp.ControllingClient.AgentId, homeURI, out message);
|
||||||
|
|
|
@ -532,11 +532,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||||
GatekeeperServiceConnector gConn = new GatekeeperServiceConnector();
|
GatekeeperServiceConnector gConn = new GatekeeperServiceConnector();
|
||||||
GridRegion gatekeeper = new GridRegion();
|
GridRegion gatekeeper = new GridRegion();
|
||||||
gatekeeper.ServerURI = lm.Gatekeeper;
|
gatekeeper.ServerURI = lm.Gatekeeper;
|
||||||
|
string homeURI = Scene.GetAgentHomeURI(remoteClient.AgentId);
|
||||||
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 message;
|
string message;
|
||||||
GridRegion finalDestination = gConn.GetHyperlinkRegion(gatekeeper, new UUID(lm.RegionID), remoteClient.AgentId, homeURI, out 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;
|
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>
|
/// <summary>
|
||||||
/// Cache the user name for later use.
|
/// Cache the user name for later use.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
Loading…
Reference in New Issue