diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs index b2334be66c..ebf2a1583f 100644 --- a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs +++ b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs @@ -4507,7 +4507,18 @@ namespace OpenSim.Region.ScriptEngine.Common public void llEjectFromLand(string pest) { m_host.AddScriptLPS(1); - NotImplemented("llEjectFromLand"); + UUID agentId = new UUID(); + if (UUID.TryParse(pest, out agentId)) + { + ScenePresence presence = World.GetScenePresence(agentId); + if (presence != null) + { + // agent must be over the owners land + if (m_host.OwnerID == World.GetLandOwner(presence.AbsolutePosition.X, presence.AbsolutePosition.Y)) + World.TeleportClientHome(agentId, presence.ControllingClient); + } + } + // ScriptSleep(5000); } public LSL_Types.list llParseString2List(string str, LSL_Types.list separators, LSL_Types.list spacers) diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 1cde8d210f..20dc46ec53 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -4408,7 +4408,18 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llEjectFromLand(string pest) { m_host.AddScriptLPS(1); - NotImplemented("llEjectFromLand"); + UUID agentId = new UUID(); + if (UUID.TryParse(pest, out agentId)) + { + ScenePresence presence = World.GetScenePresence(agentId); + if (presence != null) + { + // agent must be over the owners land + if (m_host.OwnerID == World.GetLandOwner(presence.AbsolutePosition.X, presence.AbsolutePosition.Y)) + World.TeleportClientHome(agentId, presence.ControllingClient); + } + } + // ScriptSleep(5000); } public LSL_Types.list llParseString2List(string str, LSL_Types.list separators, LSL_Types.list spacers)