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-26 23:34:21 +0100
commitee6cd884c9732b492675e043fe318ffcdfecc45d (patch)
treece3343d85b54bb04a5182a4cd65355988075ad68 /OpenSim/Region/Framework
parentfactor out soon to be common media permissions check code (diff)
downloadopensim-SC_OLD-ee6cd884c9732b492675e043fe318ffcdfecc45d.zip
opensim-SC_OLD-ee6cd884c9732b492675e043fe318ffcdfecc45d.tar.gz
opensim-SC_OLD-ee6cd884c9732b492675e043fe318ffcdfecc45d.tar.bz2
opensim-SC_OLD-ee6cd884c9732b492675e043fe318ffcdfecc45d.tar.xz
implement serverside checks for media texture navigation in order to stop naughty clients
Diffstat (limited to 'OpenSim/Region/Framework')
-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