Merge branch 'master' into careminster

avinationmerge
Melanie 2012-01-15 14:40:33 +00:00
commit 9447b6d15f
1 changed files with 24 additions and 14 deletions

View File

@ -748,7 +748,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
{
// High because there is no security check. High griefer potential
//
CheckThreatLevel(ThreatLevel.High, "osTeleportAgent");
CheckThreatLevel(ThreatLevel.Severe, "osTeleportAgent");
TeleportAgent(agent, regionName, position, lookat, false);
}
@ -765,11 +765,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
{
// For osTeleportAgent, agent must be over owners land to avoid abuse
// For osTeleportOwner, this restriction isn't necessary
if (relaxRestrictions ||
m_host.OwnerID
== World.LandChannel.GetLandObject(
presence.AbsolutePosition.X, presence.AbsolutePosition.Y).LandData.OwnerID)
{
// commented out because its redundant and uneeded please remove eventually.
// if (relaxRestrictions ||
// m_host.OwnerID
// == World.LandChannel.GetLandObject(
// presence.AbsolutePosition.X, presence.AbsolutePosition.Y).LandData.OwnerID)
// {
// We will launch the teleport on a new thread so that when the script threads are terminated
// before teleport in ScriptInstance.GetXMLState(), we don't end up aborting the one doing the teleporting.
Util.FireAndForget(
@ -778,7 +781,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
new Vector3((float)lookat.x, (float)lookat.y, (float)lookat.z), (uint)TPFlags.ViaLocation));
ScriptSleep(5000);
}
// }
}
}
}
@ -787,7 +792,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
{
// High because there is no security check. High griefer potential
//
CheckThreatLevel(ThreatLevel.High, "osTeleportAgent");
CheckThreatLevel(ThreatLevel.Severe, "osTeleportAgent");
TeleportAgent(agent, regionX, regionY, position, lookat, false);
}
@ -806,11 +811,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
{
// For osTeleportAgent, agent must be over owners land to avoid abuse
// For osTeleportOwner, this restriction isn't necessary
if (relaxRestrictions ||
m_host.OwnerID
== World.LandChannel.GetLandObject(
presence.AbsolutePosition.X, presence.AbsolutePosition.Y).LandData.OwnerID)
{
// commented out because its redundant and uneeded please remove eventually.
// if (relaxRestrictions ||
// m_host.OwnerID
// == World.LandChannel.GetLandObject(
// presence.AbsolutePosition.X, presence.AbsolutePosition.Y).LandData.OwnerID)
// {
// We will launch the teleport on a new thread so that when the script threads are terminated
// before teleport in ScriptInstance.GetXMLState(), we don't end up aborting the one doing the teleporting.
Util.FireAndForget(
@ -819,7 +827,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
new Vector3((float)lookat.x, (float)lookat.y, (float)lookat.z), (uint)TPFlags.ViaLocation));
ScriptSleep(5000);
}
// }
}
}
}