aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/Scene.Permissions.cs
diff options
context:
space:
mode:
authorMelanie2010-08-06 18:08:40 +0100
committerMelanie2010-08-06 18:08:40 +0100
commit26387252f5adbf71dc77084ff2d1b463fad5038c (patch)
tree0453fd501165368affa2917180ef3e43c5555ea0 /OpenSim/Region/Framework/Scenes/Scene.Permissions.cs
parentMerge branch 'careminster-presence-refactor' of ssh://3dhosting.de/var/git/ca... (diff)
parentFix a parenthesis in prior commit (diff)
downloadopensim-SC-26387252f5adbf71dc77084ff2d1b463fad5038c.zip
opensim-SC-26387252f5adbf71dc77084ff2d1b463fad5038c.tar.gz
opensim-SC-26387252f5adbf71dc77084ff2d1b463fad5038c.tar.bz2
opensim-SC-26387252f5adbf71dc77084ff2d1b463fad5038c.tar.xz
Merge branch 'master' into careminster-presence-refactor
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Scene.Permissions.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.Permissions.cs38
1 files changed, 36 insertions, 2 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Permissions.cs b/OpenSim/Region/Framework/Scenes/Scene.Permissions.cs
index a523351..4e80bf2 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.Permissions.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.Permissions.cs
@@ -1,4 +1,4 @@
1/* 1/*
2 * Copyright (c) Contributors, http://opensimulator.org/ 2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders. 3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 * 4 *
@@ -82,6 +82,8 @@ namespace OpenSim.Region.Framework.Scenes
82 public delegate bool CopyUserInventoryHandler(UUID itemID, UUID userID); 82 public delegate bool CopyUserInventoryHandler(UUID itemID, UUID userID);
83 public delegate bool DeleteUserInventoryHandler(UUID itemID, UUID userID); 83 public delegate bool DeleteUserInventoryHandler(UUID itemID, UUID userID);
84 public delegate bool TeleportHandler(UUID userID, Scene scene); 84 public delegate bool TeleportHandler(UUID userID, Scene scene);
85 public delegate bool ControlPrimMediaHandler(UUID userID, UUID primID, int face);
86 public delegate bool InteractWithPrimMediaHandler(UUID userID, UUID primID, int face);
85 #endregion 87 #endregion
86 88
87 public class ScenePermissions 89 public class ScenePermissions
@@ -141,6 +143,8 @@ namespace OpenSim.Region.Framework.Scenes
141 public event CopyUserInventoryHandler OnCopyUserInventory; 143 public event CopyUserInventoryHandler OnCopyUserInventory;
142 public event DeleteUserInventoryHandler OnDeleteUserInventory; 144 public event DeleteUserInventoryHandler OnDeleteUserInventory;
143 public event TeleportHandler OnTeleport; 145 public event TeleportHandler OnTeleport;
146 public event ControlPrimMediaHandler OnControlPrimMedia;
147 public event InteractWithPrimMediaHandler OnInteractWithPrimMedia;
144 #endregion 148 #endregion
145 149
146 #region Object Permission Checks 150 #region Object Permission Checks
@@ -964,5 +968,35 @@ namespace OpenSim.Region.Framework.Scenes
964 } 968 }
965 return true; 969 return true;
966 } 970 }
971
972 public bool CanControlPrimMedia(UUID userID, UUID primID, int face)
973 {
974 ControlPrimMediaHandler handler = OnControlPrimMedia;
975 if (handler != null)
976 {
977 Delegate[] list = handler.GetInvocationList();
978 foreach (ControlPrimMediaHandler h in list)
979 {
980 if (h(userID, primID, face) == false)
981 return false;
982 }
983 }
984 return true;
985 }
986
987 public bool CanInteractWithPrimMedia(UUID userID, UUID primID, int face)
988 {
989 InteractWithPrimMediaHandler handler = OnInteractWithPrimMedia;
990 if (handler != null)
991 {
992 Delegate[] list = handler.GetInvocationList();
993 foreach (InteractWithPrimMediaHandler h in list)
994 {
995 if (h(userID, primID, face) == false)
996 return false;
997 }
998 }
999 return true;
1000 }
967 } 1001 }
968} 1002} \ No newline at end of file