aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
diff options
context:
space:
mode:
authorJeff Ames2008-07-06 14:02:22 +0000
committerJeff Ames2008-07-06 14:02:22 +0000
commitd470d30c09fde202f708a9c8af763f5d16e18bfb (patch)
tree6a86572d268dda911a5208bf5be1a1f2c19adc3c /OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
parentRemove scripts that don't really belong in OpenSim SVN. (diff)
downloadopensim-SC-d470d30c09fde202f708a9c8af763f5d16e18bfb.zip
opensim-SC-d470d30c09fde202f708a9c8af763f5d16e18bfb.tar.gz
opensim-SC-d470d30c09fde202f708a9c8af763f5d16e18bfb.tar.bz2
opensim-SC-d470d30c09fde202f708a9c8af763f5d16e18bfb.tar.xz
Copyright notices and formatting cleanup.
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/Scene.Inventory.cs')
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.Inventory.cs84
1 files changed, 42 insertions, 42 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
index 53681f8..d87b930 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
@@ -995,7 +995,7 @@ namespace OpenSim.Region.Environment.Scenes
995 else 995 else
996 { 996 {
997 CachedUserInfo profile = CommsManager.UserProfileCacheService.GetUserDetails(avatarId); 997 CachedUserInfo profile = CommsManager.UserProfileCacheService.GetUserDetails(avatarId);
998 if(profile == null || profile.RootFolder == null) 998 if (profile == null || profile.RootFolder == null)
999 { 999 {
1000 m_log.ErrorFormat( 1000 m_log.ErrorFormat(
1001 "[PRIM INVENTORY]: " + 1001 "[PRIM INVENTORY]: " +
@@ -1040,7 +1040,7 @@ namespace OpenSim.Region.Environment.Scenes
1040 return; 1040 return;
1041 } 1041 }
1042 1042
1043 if(part.OwnerID != destPart.OwnerID && (part.GetEffectiveObjectFlags() & (uint)LLObject.ObjectFlags.AllowInventoryDrop) == 0) 1043 if (part.OwnerID != destPart.OwnerID && (part.GetEffectiveObjectFlags() & (uint)LLObject.ObjectFlags.AllowInventoryDrop) == 0)
1044 { 1044 {
1045 // object cannot copy items to an object owned by a different owner 1045 // object cannot copy items to an object owned by a different owner
1046 // unless llAllowInventoryDrop has been called 1046 // unless llAllowInventoryDrop has been called
@@ -1049,7 +1049,7 @@ namespace OpenSim.Region.Environment.Scenes
1049 } 1049 }
1050 1050
1051 // must have both move and modify permission to put an item in an object 1051 // must have both move and modify permission to put an item in an object
1052 if((part.OwnerMask & ((uint)PermissionMask.Move | (uint)PermissionMask.Modify)) == 0 ) 1052 if ((part.OwnerMask & ((uint)PermissionMask.Move | (uint)PermissionMask.Modify)) == 0)
1053 { 1053 {
1054 return; 1054 return;
1055 } 1055 }
@@ -1099,7 +1099,7 @@ namespace OpenSim.Region.Environment.Scenes
1099 1099
1100 ScenePresence avatar; 1100 ScenePresence avatar;
1101 1101
1102 if(TryGetAvatar(srcTaskItem.OwnerID, out avatar)) 1102 if (TryGetAvatar(srcTaskItem.OwnerID, out avatar))
1103 { 1103 {
1104 destPart.GetProperties(avatar.ControllingClient); 1104 destPart.GetProperties(avatar.ControllingClient);
1105 } 1105 }
@@ -1108,7 +1108,7 @@ namespace OpenSim.Region.Environment.Scenes
1108 public void MoveTaskInventoryItems(LLUUID destID, string category, SceneObjectPart host, List<LLUUID> items) 1108 public void MoveTaskInventoryItems(LLUUID destID, string category, SceneObjectPart host, List<LLUUID> items)
1109 { 1109 {
1110 CachedUserInfo profile = CommsManager.UserProfileCacheService.GetUserDetails(destID); 1110 CachedUserInfo profile = CommsManager.UserProfileCacheService.GetUserDetails(destID);
1111 if(profile == null || profile.RootFolder == null) 1111 if (profile == null || profile.RootFolder == null)
1112 { 1112 {
1113 m_log.ErrorFormat( 1113 m_log.ErrorFormat(
1114 "[PRIM INVENTORY]: " + 1114 "[PRIM INVENTORY]: " +
@@ -1325,8 +1325,8 @@ namespace OpenSim.Region.Environment.Scenes
1325 /// <param name="itemID"> </param> 1325 /// <param name="itemID"> </param>
1326 /// <param name="localID"></param> 1326 /// <param name="localID"></param>
1327 public void RezScript(LLUUID srcId, SceneObjectPart srcPart, LLUUID destId, int pin, int running, int start_param) 1327 public void RezScript(LLUUID srcId, SceneObjectPart srcPart, LLUUID destId, int pin, int running, int start_param)
1328 { 1328 {
1329 TaskInventoryItem srcTaskItem = srcPart.GetInventoryItem(srcId); 1329 TaskInventoryItem srcTaskItem = srcPart.GetInventoryItem(srcId);
1330 1330
1331 if (srcTaskItem == null) 1331 if (srcTaskItem == null)
1332 { 1332 {
@@ -1348,29 +1348,29 @@ namespace OpenSim.Region.Environment.Scenes
1348 destId); 1348 destId);
1349 return; 1349 return;
1350 } 1350 }
1351 1351
1352 // Must own the object, and have modify rights 1352 // Must own the object, and have modify rights
1353 if(srcPart.OwnerID != destPart.OwnerID) 1353 if (srcPart.OwnerID != destPart.OwnerID)
1354 return; 1354 return;
1355 1355
1356 if((destPart.OwnerMask & (uint)PermissionMask.Modify) == 0) 1356 if ((destPart.OwnerMask & (uint)PermissionMask.Modify) == 0)
1357 return; 1357 return;
1358 1358
1359 if (destPart.ScriptAccessPin != pin) 1359 if (destPart.ScriptAccessPin != pin)
1360 { 1360 {
1361 m_log.WarnFormat( 1361 m_log.WarnFormat(
1362 "[PRIM INVENTORY]: " + 1362 "[PRIM INVENTORY]: " +
1363 "Script in object {0} : {1}, attempted to load script {2} : {3} into object {4} : {5} with invalid pin {6}", 1363 "Script in object {0} : {1}, attempted to load script {2} : {3} into object {4} : {5} with invalid pin {6}",
1364 srcPart.Name, srcId, srcTaskItem.Name, srcTaskItem.ItemID, destPart.Name, destId, pin); 1364 srcPart.Name, srcId, srcTaskItem.Name, srcTaskItem.ItemID, destPart.Name, destId, pin);
1365 // the LSL Wiki says we are supposed to shout on the DEBUG_CHANNEL - 1365 // the LSL Wiki says we are supposed to shout on the DEBUG_CHANNEL -
1366 // "Object: Task Object trying to illegally load script onto task Other_Object!" 1366 // "Object: Task Object trying to illegally load script onto task Other_Object!"
1367 // How do we shout from in here? 1367 // How do we shout from in here?
1368 return; 1368 return;
1369 } 1369 }
1370 1370
1371 TaskInventoryItem destTaskItem = new TaskInventoryItem(); 1371 TaskInventoryItem destTaskItem = new TaskInventoryItem();
1372 1372
1373 destTaskItem.ItemID = LLUUID.Random(); 1373 destTaskItem.ItemID = LLUUID.Random();
1374 destTaskItem.CreatorID = srcTaskItem.CreatorID; 1374 destTaskItem.CreatorID = srcTaskItem.CreatorID;
1375 destTaskItem.AssetID = srcTaskItem.AssetID; 1375 destTaskItem.AssetID = srcTaskItem.AssetID;
1376 destTaskItem.GroupID = destPart.GroupID; 1376 destTaskItem.GroupID = destPart.GroupID;
@@ -1405,25 +1405,25 @@ namespace OpenSim.Region.Environment.Scenes
1405 destTaskItem.Name = srcTaskItem.Name; 1405 destTaskItem.Name = srcTaskItem.Name;
1406 destTaskItem.InvType = srcTaskItem.InvType; 1406 destTaskItem.InvType = srcTaskItem.InvType;
1407 destTaskItem.Type = srcTaskItem.Type; 1407 destTaskItem.Type = srcTaskItem.Type;
1408 1408
1409 destPart.AddInventoryItemExclusive(destTaskItem); 1409 destPart.AddInventoryItemExclusive(destTaskItem);
1410 1410
1411 if (running > 0) 1411 if (running > 0)
1412 { 1412 {
1413 if (ExternalChecks.ExternalChecksCanRunScript(destTaskItem.AssetID, destPart.UUID, destPart.OwnerID)) 1413 if (ExternalChecks.ExternalChecksCanRunScript(destTaskItem.AssetID, destPart.UUID, destPart.OwnerID))
1414 { 1414 {
1415 destPart.CreateScriptInstance(destTaskItem, 0, false); 1415 destPart.CreateScriptInstance(destTaskItem, 0, false);
1416 } 1416 }
1417 } 1417 }
1418 1418
1419 ScenePresence avatar; 1419 ScenePresence avatar;
1420 1420
1421 if(TryGetAvatar(srcTaskItem.OwnerID, out avatar)) 1421 if (TryGetAvatar(srcTaskItem.OwnerID, out avatar))
1422 { 1422 {
1423 destPart.GetProperties(avatar.ControllingClient); 1423 destPart.GetProperties(avatar.ControllingClient);
1424 } 1424 }
1425 } 1425 }
1426 1426
1427 /// <summary> 1427 /// <summary>
1428 /// Called when an object is removed from the environment into inventory. 1428 /// Called when an object is removed from the environment into inventory.
1429 /// </summary> 1429 /// </summary>
@@ -1497,7 +1497,7 @@ namespace OpenSim.Region.Environment.Scenes
1497 m_inventoryTicker.Elapsed += InventoryRunDeleteTimer; 1497 m_inventoryTicker.Elapsed += InventoryRunDeleteTimer;
1498 } 1498 }
1499 1499
1500 lock(m_inventoryDeletes) 1500 lock (m_inventoryDeletes)
1501 { 1501 {
1502 DeleteToInventoryHolder dtis = new DeleteToInventoryHolder(); 1502 DeleteToInventoryHolder dtis = new DeleteToInventoryHolder();
1503 dtis.DeRezPacket = DeRezPacket; 1503 dtis.DeRezPacket = DeRezPacket;
@@ -2246,7 +2246,7 @@ namespace OpenSim.Region.Environment.Scenes
2246 public void GetScriptRunning(IClientAPI controllingClient, LLUUID objectID, LLUUID itemID) 2246 public void GetScriptRunning(IClientAPI controllingClient, LLUUID objectID, LLUUID itemID)
2247 { 2247 {
2248 IScriptModule scriptModule = RequestModuleInterface<IScriptModule>(); 2248 IScriptModule scriptModule = RequestModuleInterface<IScriptModule>();
2249 if(scriptModule == null) 2249 if (scriptModule == null)
2250 return; 2250 return;
2251 2251
2252 controllingClient.SendScriptRunningReply(objectID, itemID, 2252 controllingClient.SendScriptRunningReply(objectID, itemID,
@@ -2256,10 +2256,10 @@ namespace OpenSim.Region.Environment.Scenes
2256 public void SetScriptRunning(IClientAPI controllingClient, LLUUID objectID, LLUUID itemID, bool running) 2256 public void SetScriptRunning(IClientAPI controllingClient, LLUUID objectID, LLUUID itemID, bool running)
2257 { 2257 {
2258 SceneObjectPart part = GetSceneObjectPart(objectID); 2258 SceneObjectPart part = GetSceneObjectPart(objectID);
2259 if(part == null) 2259 if (part == null)
2260 return; 2260 return;
2261 2261
2262 if(running) 2262 if (running)
2263 EventManager.TriggerStartScript(part.LocalId, itemID); 2263 EventManager.TriggerStartScript(part.LocalId, itemID);
2264 else 2264 else
2265 EventManager.TriggerStopScript(part.LocalId, itemID); 2265 EventManager.TriggerStopScript(part.LocalId, itemID);