Plumb a code path for the entity transfer module to ask a destination scene

whether or not an agent is allowed there as a root agent.
This commit is contained in:
Melanie
2010-12-09 02:01:41 +01:00
parent 80b84e4bad
commit f28dc77ab4
6 changed files with 132 additions and 0 deletions

View File

@@ -115,6 +115,11 @@ namespace OpenSim.Server.Handlers.Simulation
DoChildAgentDelete(request, responsedata, agentID, action, regionID);
return responsedata;
}
else if (method.Equals("QUERYACCESSS"))
{
DoQueryAccess(request, responsedata, agentID, regionID);
return responsedata;
}
else
{
m_log.InfoFormat("[AGENT HANDLER]: method {0} not supported in agent message", method);
@@ -305,6 +310,27 @@ namespace OpenSim.Server.Handlers.Simulation
return m_SimulationService.UpdateAgent(destination, agent);
}
protected virtual void DoQueryAccess(Hashtable request, Hashtable responsedata, UUID id, UUID regionID)
{
if (m_SimulationService == null)
{
m_log.Debug("[AGENT HANDLER]: Agent QUERY called. Harmless but useless.");
responsedata["content_type"] = "application/json";
responsedata["int_response_code"] = HttpStatusCode.NotImplemented;
responsedata["str_response_string"] = string.Empty;
return;
}
GridRegion destination = new GridRegion();
destination.RegionID = regionID;
bool result = m_SimulationService.QueryAccess(destination, id);
responsedata["int_response_code"] = HttpStatusCode.OK;
responsedata["str_response_string"] = result.ToString();
}
protected virtual void DoAgentGet(Hashtable request, Hashtable responsedata, UUID id, UUID regionID)
{
if (m_SimulationService == null)