29 using System.Collections.Generic;
30 using System.Reflection;
34 using OpenSim.Framework;
35 using OpenSim.Region.Framework.Interfaces;
37 namespace OpenSim.
Region.Framework.Scenes
44 public delegate
bool RezObjectHandler(
int objectCount, UUID owner, Vector3 objectPosition, Scene scene);
49 public delegate
bool DuplicateObjectHandler(
int objectCount, UUID objectID, UUID owner, Scene scene, Vector3 objectPosition);
50 public delegate
bool EditObjectHandler(UUID objectID, UUID editorID, Scene scene);
53 public delegate
bool ObjectEntryHandler(UUID objectID,
bool enteringRegion, Vector3 newPoint, Scene scene);
57 public delegate
bool ViewScriptHandler(UUID script, UUID objectID, UUID user, Scene scene);
58 public delegate
bool ViewNotecardHandler(UUID script, UUID objectID, UUID user, Scene scene);
59 public delegate
bool EditScriptHandler(UUID script, UUID objectID, UUID user, Scene scene);
60 public delegate
bool EditNotecardHandler(UUID notecard, UUID objectID, UUID user, Scene scene);
61 public delegate
bool RunScriptHandler(UUID script, UUID objectID, UUID user, Scene scene);
65 public delegate
bool ResetScriptHandler(UUID prim, UUID script, UUID user, Scene scene);
69 public delegate
bool IsGodHandler(UUID user, Scene requestFromScene);
101 private Scene m_scene;
166 #region Object Permission Checks
172 #pragma warning disable 0612
174 PrimFlags.ObjectModify |
175 PrimFlags.ObjectCopy |
176 PrimFlags.ObjectMove |
177 PrimFlags.ObjectTransfer |
178 PrimFlags.ObjectYouOwner |
179 PrimFlags.ObjectAnyOwner |
180 PrimFlags.ObjectOwnerModify |
181 PrimFlags.ObjectYouOfficer;
182 #pragma warning restore 0612
189 uint perms = part.GetEffectiveObjectFlags() | (uint)DEFAULT_FLAGS;
192 if (handlerGenerateClientFlags != null)
194 Delegate[] list = handlerGenerateClientFlags.GetInvocationList();
197 perms &= check(userID, objectID);
215 Delegate[] list = handler.GetInvocationList();
230 Delegate[] list = handler.GetInvocationList();
241 public bool CanRezObject(
int objectCount, UUID owner, Vector3 objectPosition)
246 Delegate[] list = handler.GetInvocationList();
249 if (h(objectCount, owner,objectPosition, m_scene) ==
false)
258 #region DELETE OBJECT
266 Delegate[] list = handler.GetInvocationList();
269 if (h(objectID, deleter, m_scene) ==
false)
287 Delegate[] list = handler.GetInvocationList();
290 if (h(objectID, recipient, m_scene) ==
false)
311 Delegate[] list = handler.GetInvocationList();
314 if (h(objectID, AvatarTakingUUID, m_scene) ==
false)
331 #region TAKE COPY OBJECT
339 Delegate[] list = handler.GetInvocationList();
342 if (h(objectID, userID, m_scene) ==
false)
359 #region DUPLICATE OBJECT
365 Delegate[] list = handler.GetInvocationList();
368 if (h(objectCount, objectID, owner, m_scene, objectPosition) ==
false)
383 Delegate[] list = handler.GetInvocationList();
386 if (h(objectID, editorID, m_scene) ==
false)
398 Delegate[] list = handler.GetInvocationList();
401 if (h(objectID, editorID, m_scene) ==
false)
416 Delegate[] list = handler.GetInvocationList();
419 if (h(objectID, moverID, m_scene) ==
false)
434 Delegate[] list = handler.GetInvocationList();
437 if (h(objectID, enteringRegion, newPoint, m_scene) ==
false)
446 #region RETURN OBJECT
454 Delegate[] list = handler.GetInvocationList();
457 if (h(land, user, objects, m_scene) ==
false)
474 #region INSTANT MESSAGE
480 Delegate[] list = handler.GetInvocationList();
483 if (h(user, target, m_scene) ==
false)
492 #region INVENTORY TRANSFER
498 Delegate[] list = handler.GetInvocationList();
501 if (h(user, target, m_scene) ==
false)
516 Delegate[] list = handler.GetInvocationList();
519 if (h(script, objectID, user, m_scene) ==
false)
531 Delegate[] list = handler.GetInvocationList();
534 if (h(script, objectID, user, m_scene) ==
false)
549 Delegate[] list = handler.GetInvocationList();
552 if (h(script, objectID, user, m_scene) ==
false)
564 Delegate[] list = handler.GetInvocationList();
567 if (h(script, objectID, user, m_scene) ==
false)
576 #region RUN SCRIPT (When Script Placed in Object)
582 Delegate[] list = handler.GetInvocationList();
585 if (h(script, objectID, user, m_scene) ==
false)
594 #region COMPILE SCRIPT (When Script needs to get (re)compiled)
600 Delegate[] list = handler.GetInvocationList();
603 if (h(ownerUUID, scriptType, m_scene) ==
false)
612 #region START SCRIPT (When Script run box is Checked after placed in object)
618 Delegate[] list = handler.GetInvocationList();
621 if (h(script, user, m_scene) ==
false)
630 #region STOP SCRIPT (When Script run box is unchecked after placed in object)
636 Delegate[] list = handler.GetInvocationList();
639 if (h(script, user, m_scene) ==
false)
654 Delegate[] list = handler.GetInvocationList();
657 if (h(prim, script, user, m_scene) ==
false)
666 #region TERRAFORM LAND
672 Delegate[] list = handler.GetInvocationList();
675 if (h(user, pos, m_scene) ==
false)
684 #region RUN CONSOLE COMMAND
690 Delegate[] list = handler.GetInvocationList();
693 if (h(user, m_scene) ==
false)
702 #region CAN ISSUE ESTATE COMMAND
708 Delegate[] list = handler.GetInvocationList();
711 if (h(user, m_scene, ownerCommand) ==
false)
719 #region CAN BE GODLIKE
725 Delegate[] list = handler.GetInvocationList();
728 if (h(user, m_scene) ==
false)
740 Delegate[] list = handler.GetInvocationList();
743 if (h(user, m_scene) ==
false)
755 Delegate[] list = handler.GetInvocationList();
758 if (h(user) ==
false)
771 Delegate[] list = handler.GetInvocationList();
774 if (h(user) ==
false)
788 Delegate[] list = handler.GetInvocationList();
791 if (h(user, parcel, p, m_scene, allowManager) ==
false)
805 Delegate[] list = handler.GetInvocationList();
808 if (h(user, parcel, m_scene) ==
false)
816 #region ABANDON PARCEL
822 Delegate[] list = handler.GetInvocationList();
825 if (h(user, parcel, m_scene) ==
false)
838 Delegate[] list = handler.GetInvocationList();
841 if (h(user, parcel, m_scene) ==
false)
853 Delegate[] list = handler.GetInvocationList();
856 if (h(user, parcel, m_scene) ==
false)
868 Delegate[] list = handler.GetInvocationList();
871 if (h(user, group, m_scene) ==
false)
883 Delegate[] list = handler.GetInvocationList();
886 if (h(user, parcel, m_scene) ==
false)
898 Delegate[] list = handler.GetInvocationList();
901 if (h(user, objectID) ==
false)
913 Delegate[] list = handler.GetInvocationList();
916 if (h(user, objectID) ==
false)
937 Delegate[] list = handler.GetInvocationList();
940 if (h(invType, objectID, userID) ==
false)
952 Delegate[] list = handler.GetInvocationList();
955 if (h(itemID, objectID, userID) ==
false)
967 Delegate[] list = handler.GetInvocationList();
970 if (h(itemID, objectID, userID) ==
false)
982 Delegate[] list = handler.GetInvocationList();
985 if (h(itemID, objectID, userID) ==
false)
1001 if (handler != null)
1003 Delegate[] list = handler.GetInvocationList();
1006 if (h(invType, userID) ==
false)
1022 if (handler != null)
1024 Delegate[] list = handler.GetInvocationList();
1027 if (h(itemID, userID) ==
false)
1043 if (handler != null)
1045 Delegate[] list = handler.GetInvocationList();
1048 if (h(itemID, userID) ==
false)
1064 if (handler != null)
1066 Delegate[] list = handler.GetInvocationList();
1069 if (h(itemID, userID) ==
false)
1079 if (handler != null)
1081 Delegate[] list = handler.GetInvocationList();
1084 if (h(itemID, userID, recipientID) ==
false)
1094 if (handler != null)
1096 Delegate[] list = handler.GetInvocationList();
1099 if (h(userID, m_scene) ==
false)
1109 if (handler != null)
1111 Delegate[] list = handler.GetInvocationList();
1114 if (h(userID, primID, face) ==
false)
1124 if (handler != null)
1126 Delegate[] list = handler.GetInvocationList();
1129 if (h(userID, primID, face) ==
false)
delegate bool DelinkObjectHandler(UUID user, UUID objectID)
EditObjectHandler OnEditObject
CreateUserInventoryHandler OnCreateUserInventory
bool CanTakeObject(UUID objectID, UUID AvatarTakingUUID)
PropagatePermissionsHandler OnPropagatePermissions
bool IsEstateManager(UUID user)
TransferUserInventoryHandler OnTransferUserInventory
delegate bool AbandonParcelHandler(UUID user, ILandObject parcel, Scene scene)
delegate bool EditUserInventoryHandler(UUID itemID, UUID userID)
BypassPermissionsHandler OnBypassPermissions
RunConsoleCommandHandler OnRunConsoleCommand
SellParcelHandler OnSellParcel
LinkObjectHandler OnLinkObject
delegate bool IsGridGodHandler(UUID user, Scene requestFromScene)
ScenePermissions(Scene scene)
delegate bool TeleportHandler(UUID userID, Scene scene)
SetBypassPermissionsHandler OnSetBypassPermissions
TakeObjectHandler OnTakeObject
delegate bool DeedObjectHandler(UUID user, UUID group, Scene scene)
ReturnObjectsHandler OnReturnObjects
delegate bool TransferUserInventoryHandler(UUID itemID, UUID userID, UUID recipientID)
StartScriptHandler OnStartScript
void SetBypassPermissions(bool value)
delegate bool DeedParcelHandler(UUID user, ILandObject parcel, Scene scene)
delegate bool PropagatePermissionsHandler()
TransferObjectHandler OnTransferObject
bool CanReturnObjects(ILandObject land, UUID user, List< SceneObjectGroup > objects)
delegate bool ViewScriptHandler(UUID script, UUID objectID, UUID user, Scene scene)
delegate uint GenerateClientFlagsHandler(UUID userID, UUID objectID)
delegate bool InventoryTransferHandler(UUID user, UUID target, Scene startScene)
ResetScriptHandler OnResetScript
bool CanCopyUserInventory(UUID itemID, UUID userID)
Check whether the specified user is allowed to copy the given inventory item from their own inventory...
delegate bool CompileScriptHandler(UUID ownerUUID, int scriptType, Scene scene)
TerraformLandHandler OnTerraformLand
ControlPrimMediaHandler OnControlPrimMedia
ViewScriptHandler OnViewScript
StopScriptHandler OnStopScript
RezObjectHandler OnRezObject
EditNotecardHandler OnEditNotecard
delegate bool ViewNotecardHandler(UUID script, UUID objectID, UUID user, Scene scene)
TransferObjectInventoryHandler OnTransferObjectInventory
delegate bool EditScriptHandler(UUID script, UUID objectID, UUID user, Scene scene)
bool CanDeedParcel(UUID user, ILandObject parcel)
bool CanInventoryTransfer(UUID user, UUID target)
DuplicateObjectHandler OnDuplicateObject
DeleteUserInventoryHandler OnDeleteUserInventory
delegate bool DeleteUserInventoryHandler(UUID itemID, UUID userID)
InteractWithPrimMediaHandler OnInteractWithPrimMedia
EditParcelPropertiesHandler OnEditParcelProperties
ObjectEntryHandler OnObjectEntry
delegate bool BypassPermissionsHandler()
bool CanInteractWithPrimMedia(UUID userID, UUID primID, int face)
bool CanCreateUserInventory(int invType, UUID userID)
Check whether the specified user is allowed to create the given inventory type in their inventory...
TakeCopyObjectHandler OnTakeCopyObject
bool CanCompileScript(UUID ownerUUID, int scriptType)
delegate bool TransferObjectInventoryHandler(UUID itemID, UUID objectID, UUID userID)
delegate bool DeleteObjectHandler(UUID objectID, UUID deleter, Scene scene)
AbandonParcelHandler OnAbandonParcel
delegate void SetBypassPermissionsHandler(bool value)
delegate bool RunConsoleCommandHandler(UUID user, Scene requestFromScene)
ViewNotecardHandler OnViewNotecard
EditUserInventoryHandler OnEditUserInventory
CopyObjectInventoryHandler OnCopyObjectInventory
bool CanDelinkObject(UUID user, UUID objectID)
bool CanTransferObjectInventory(UUID itemID, UUID objectID, UUID userID)
bool CanTransferObject(UUID objectID, UUID recipient)
delegate bool MoveObjectHandler(UUID objectID, UUID moverID, Scene scene)
bool PropagatePermissions()
bool CanResetScript(UUID prim, UUID script, UUID user)
delegate bool IsEstateManagerHandler(UUID user)
delegate bool DuplicateObjectHandler(int objectCount, UUID objectID, UUID owner, Scene scene, Vector3 objectPosition)
delegate bool TakeObjectHandler(UUID objectID, UUID stealer, Scene scene)
delegate bool EditParcelPropertiesHandler(UUID user, ILandObject parcel, GroupPowers p, Scene scene, bool allowManager)
delegate bool RunScriptHandler(UUID script, UUID objectID, UUID user, Scene scene)
CreateObjectInventoryHandler OnCreateObjectInventory
bool CanEditObject(UUID objectID, UUID editorID)
delegate bool IssueEstateCommandHandler(UUID user, Scene requestFromScene, bool ownerCommand)
delegate bool IsGodHandler(UUID user, Scene requestFromScene)
bool CanRunScript(UUID script, UUID objectID, UUID user)
RunScriptHandler OnRunScript
delegate bool CopyUserInventoryHandler(UUID itemID, UUID userID)
bool CanDeedObject(UUID user, UUID group)
bool CanObjectEntry(UUID objectID, bool enteringRegion, Vector3 newPoint)
TeleportHandler OnTeleport
EditScriptHandler OnEditScript
bool IsGridGod(UUID user)
bool CanTerraformLand(UUID user, Vector3 pos)
delegate bool StopScriptHandler(UUID script, UUID user, Scene scene)
bool CanEditParcelProperties(UUID user, ILandObject parcel, GroupPowers p, bool allowManager)
delegate bool ReturnObjectsHandler(ILandObject land, UUID user, List< SceneObjectGroup > objects, Scene scene)
bool CanAbandonParcel(UUID user, ILandObject parcel)
bool CanEditUserInventory(UUID itemID, UUID userID)
Check whether the specified user is allowed to edit the given inventory item within their own invento...
delegate bool EditObjectInventoryHandler(UUID objectID, UUID editorID, Scene scene)
bool CanTakeCopyObject(UUID objectID, UUID userID)
delegate bool EditNotecardHandler(UUID notecard, UUID objectID, UUID user, Scene scene)
delegate bool RezObjectHandler(int objectCount, UUID owner, Vector3 objectPosition, Scene scene)
bool CanTransferUserInventory(UUID itemID, UUID userID, UUID recipientID)
bool CanViewNotecard(UUID script, UUID objectID, UUID user)
InventoryTransferHandler OnInventoryTransfer
delegate bool TakeCopyObjectHandler(UUID objectID, UUID userID, Scene inScene)
delegate bool TransferObjectHandler(UUID objectID, UUID recipient, Scene scene)
uint GenerateClientFlags(UUID userID, UUID objectID)
delegate bool CopyObjectInventoryHandler(UUID itemID, UUID objectID, UUID userID)
delegate bool ReclaimParcelHandler(UUID user, ILandObject parcel, Scene scene)
bool CanMoveObject(UUID objectID, UUID moverID)
bool CanCreateObjectInventory(int invType, UUID objectID, UUID userID)
DeedParcelHandler OnDeedParcel
delegate bool StartScriptHandler(UUID script, UUID user, Scene scene)
CompileScriptHandler OnCompileScript
bool CanDeleteObject(UUID objectID, UUID deleter)
delegate bool SellParcelHandler(UUID user, ILandObject parcel, Scene scene)
DelinkObjectHandler OnDelinkObject
delegate bool LinkObjectHandler(UUID user, UUID objectID)
bool CanReclaimParcel(UUID user, ILandObject parcel)
bool CanEditObjectInventory(UUID objectID, UUID editorID)
delegate bool InstantMessageHandler(UUID user, UUID target, Scene startScene)
bool CanSellParcel(UUID user, ILandObject parcel)
ReclaimParcelHandler OnReclaimParcel
EditObjectInventoryHandler OnEditObjectInventory
bool CanViewScript(UUID script, UUID objectID, UUID user)
IsGridGodHandler OnIsGridGod
delegate bool ObjectEntryHandler(UUID objectID, bool enteringRegion, Vector3 newPoint, Scene scene)
delegate bool ControlPrimMediaHandler(UUID userID, UUID primID, int face)
bool CanControlPrimMedia(UUID userID, UUID primID, int face)
delegate bool InteractWithPrimMediaHandler(UUID userID, UUID primID, int face)
bool IsAdministrator(UUID user)
bool CanLinkObject(UUID user, UUID objectID)
delegate bool IsAdministratorHandler(UUID user)
delegate bool TerraformLandHandler(UUID user, Vector3 position, Scene requestFromScene)
delegate bool ResetScriptHandler(UUID prim, UUID script, UUID user, Scene scene)
bool CanIssueEstateCommand(UUID user, bool ownerCommand)
delegate bool BuyLandHandler(UUID user, ILandObject parcel, Scene scene)
delegate bool EditObjectHandler(UUID objectID, UUID editorID, Scene scene)
DeedObjectHandler OnDeedObject
InstantMessageHandler OnInstantMessage
bool CanDuplicateObject(int objectCount, UUID objectID, UUID owner, Vector3 objectPosition)
CopyUserInventoryHandler OnCopyUserInventory
MoveObjectHandler OnMoveObject
GenerateClientFlagsHandler OnGenerateClientFlags
bool CanStopScript(UUID script, UUID user)
bool CanTeleport(UUID userID)
delegate bool CreateObjectInventoryHandler(int invType, UUID objectID, UUID userID)
delegate bool DeleteObjectInventoryHandler(UUID itemID, UUID objectID, UUID userID)
bool CanEditNotecard(UUID script, UUID objectID, UUID user)
DeleteObjectInventoryHandler OnDeleteObjectInventory
IssueEstateCommandHandler OnIssueEstateCommand
delegate bool CreateUserInventoryHandler(int invType, UUID userID)
DeleteObjectHandler OnDeleteObject
bool CanDeleteUserInventory(UUID itemID, UUID userID)
Check whether the specified user is allowed to edit the given inventory item within their own invento...
bool CanRezObject(int objectCount, UUID owner, Vector3 objectPosition)
bool CanCopyObjectInventory(UUID itemID, UUID objectID, UUID userID)
bool CanStartScript(UUID script, UUID user)
bool CanRunConsoleCommand(UUID user)
delegate bool EditParcelHandler(UUID user, ILandObject parcel, Scene scene)
IsAdministratorHandler OnIsAdministrator
bool CanEditScript(UUID script, UUID objectID, UUID user)
bool CanInstantMessage(UUID user, UUID target)
bool CanBuyLand(UUID user, ILandObject parcel)
bool CanDeleteObjectInventory(UUID itemID, UUID objectID, UUID userID)
IsEstateManagerHandler OnIsEstateManager