aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2010-07-13 23:58:19 +0100
committerJustin Clark-Casey (justincc)2010-07-13 23:58:19 +0100
commita4c6c4de9114497de831594e5673788d323d8e65 (patch)
tree7a05c035f2368155079c8c9b6699cd7e0848f5af /OpenSim/Region/Framework
parentfactor out soon to be common media permissions check code (diff)
downloadopensim-SC_OLD-a4c6c4de9114497de831594e5673788d323d8e65.zip
opensim-SC_OLD-a4c6c4de9114497de831594e5673788d323d8e65.tar.gz
opensim-SC_OLD-a4c6c4de9114497de831594e5673788d323d8e65.tar.bz2
opensim-SC_OLD-a4c6c4de9114497de831594e5673788d323d8e65.tar.xz
implement serverside checks for media texture navigation in order to stop naughty clients
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.Permissions.cs19
1 files changed, 18 insertions, 1 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Permissions.cs b/OpenSim/Region/Framework/Scenes/Scene.Permissions.cs
index 70af978..0033900 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.Permissions.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.Permissions.cs
@@ -82,6 +82,7 @@ namespace OpenSim.Region.Framework.Scenes
82 public delegate bool DeleteUserInventoryHandler(UUID itemID, UUID userID); 82 public delegate bool DeleteUserInventoryHandler(UUID itemID, UUID userID);
83 public delegate bool TeleportHandler(UUID userID, Scene scene); 83 public delegate bool TeleportHandler(UUID userID, Scene scene);
84 public delegate bool ControlPrimMediaHandler(UUID userID, UUID primID, int face); 84 public delegate bool ControlPrimMediaHandler(UUID userID, UUID primID, int face);
85 public delegate bool InteractWithPrimMediaHandler(UUID userID, UUID primID, int face);
85 #endregion 86 #endregion
86 87
87 public class ScenePermissions 88 public class ScenePermissions
@@ -141,6 +142,7 @@ namespace OpenSim.Region.Framework.Scenes
141 public event DeleteUserInventoryHandler OnDeleteUserInventory; 142 public event DeleteUserInventoryHandler OnDeleteUserInventory;
142 public event TeleportHandler OnTeleport; 143 public event TeleportHandler OnTeleport;
143 public event ControlPrimMediaHandler OnControlPrimMedia; 144 public event ControlPrimMediaHandler OnControlPrimMedia;
145 public event InteractWithPrimMediaHandler OnInteractWithPrimMedia;
144 #endregion 146 #endregion
145 147
146 #region Object Permission Checks 148 #region Object Permission Checks
@@ -963,6 +965,21 @@ namespace OpenSim.Region.Framework.Scenes
963 } 965 }
964 } 966 }
965 return true; 967 return true;
966 } 968 }
969
970 public bool CanInteractWithPrimMedia(UUID userID, UUID primID, int face)
971 {
972 InteractWithPrimMediaHandler handler = OnInteractWithPrimMedia;
973 if (handler != null)
974 {
975 Delegate[] list = handler.GetInvocationList();
976 foreach (InteractWithPrimMediaHandler h in list)
977 {
978 if (h(userID, primID, face) == false)
979 return false;
980 }
981 }
982 return true;
983 }
967 } 984 }
968} \ No newline at end of file 985} \ No newline at end of file