aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
diff options
context:
space:
mode:
authorMelanie2013-06-02 16:28:28 +0200
committerMelanie2013-06-02 16:28:28 +0200
commitbd87eb90d10946bb4e010ed84d9a7577d8158a07 (patch)
tree4eb5693197aa9be0346037e30246a25d7f9c6209 /OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
parentFix multi-wear of alpha and tattoo layers. (diff)
downloadopensim-SC-bd87eb90d10946bb4e010ed84d9a7577d8158a07.zip
opensim-SC-bd87eb90d10946bb4e010ed84d9a7577d8158a07.tar.gz
opensim-SC-bd87eb90d10946bb4e010ed84d9a7577d8158a07.tar.bz2
opensim-SC-bd87eb90d10946bb4e010ed84d9a7577d8158a07.tar.xz
Implement PERMISSION_TELEPORT and the needed checks to make it work.
Old auth system still works as well.
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs25
1 files changed, 18 insertions, 7 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index 6bcb361..5af2a8d 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -4641,20 +4641,31 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4641 ScenePresence presence = World.GetScenePresence(agentId); 4641 ScenePresence presence = World.GetScenePresence(agentId);
4642 if (presence != null && presence.PresenceType != PresenceType.Npc) 4642 if (presence != null && presence.PresenceType != PresenceType.Npc)
4643 { 4643 {
4644 // agent must not be a god
4645 if (presence.GodLevel >= 200) return;
4646
4647 if (destination == String.Empty) 4644 if (destination == String.Empty)
4648 destination = World.RegionInfo.RegionName; 4645 destination = World.RegionInfo.RegionName;
4649 4646
4650 // agent must be over the owners land 4647 if (m_item.PermsGranter == agentId)
4651 if (m_host.OwnerID == World.LandChannel.GetLandObject(presence.AbsolutePosition).LandData.OwnerID) 4648 {
4649 if ((m_item.PermsMask & ScriptBaseClass.PERMISSION_TELEPORT) != 0)
4650 {
4651 DoLLTeleport(presence, destination, targetPos, targetLookAt);
4652 }
4653 }
4654
4655 // agent must be wearing the object
4656 if (m_host.ParentGroup.AttachmentPoint != 0 && m_host.OwnerID == presence.UUID)
4652 { 4657 {
4653 DoLLTeleport(presence, destination, targetPos, targetLookAt); 4658 DoLLTeleport(presence, destination, targetPos, targetLookAt);
4654 } 4659 }
4655 else // or must be wearing the prim 4660 else
4656 { 4661 {
4657 if (m_host.ParentGroup.AttachmentPoint != 0 && m_host.OwnerID == presence.UUID) 4662 // agent must not be a god
4663 if (presence.GodLevel >= 200) return;
4664
4665 // agent must be over the owners land
4666 ILandObject agentLand = World.LandChannel.GetLandObject(presence.AbsolutePosition);
4667 ILandObject objectLand = World.LandChannel.GetLandObject(m_host.AbsolutePosition);
4668 if (m_host.OwnerID == objectLand.LandData.OwnerID && m_host.OwnerID == agentLand.LandData.OwnerID)
4658 { 4669 {
4659 DoLLTeleport(presence, destination, targetPos, targetLookAt); 4670 DoLLTeleport(presence, destination, targetPos, targetLookAt);
4660 } 4671 }