aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes
diff options
context:
space:
mode:
authorCharles Krinke2008-02-18 03:25:14 +0000
committerCharles Krinke2008-02-18 03:25:14 +0000
commit2c81e18fc33c12b3adcd4559b88d385779c7be6f (patch)
tree38607fed0f892e0356ba1981bf8458562a419873 /OpenSim/Region/Environment/Scenes
parentThank you very much, Hashbox for: (diff)
downloadopensim-SC-2c81e18fc33c12b3adcd4559b88d385779c7be6f.zip
opensim-SC-2c81e18fc33c12b3adcd4559b88d385779c7be6f.tar.gz
opensim-SC-2c81e18fc33c12b3adcd4559b88d385779c7be6f.tar.bz2
opensim-SC-2c81e18fc33c12b3adcd4559b88d385779c7be6f.tar.xz
Thank you very much Ahzzmandius for adding the support
to purge the avatars inventory "Trash" folder using the bizarre tortoiseSVN method of diff/patch.
Diffstat (limited to 'OpenSim/Region/Environment/Scenes')
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.Inventory.cs45
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.cs2
2 files changed, 47 insertions, 0 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
index 2212216..13fa009 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
@@ -476,6 +476,51 @@ namespace OpenSim.Region.Environment.Scenes
476 } 476 }
477 } 477 }
478 478
479 private void RemoveInventoryItem(IClientAPI remoteClient, LLUUID itemID)
480 {
481 CachedUserInfo userInfo
482 = CommsManager.UserProfileCacheService.GetUserDetails(remoteClient.AgentId);
483 if (userInfo == null)
484 {
485 m_log.Error("[AGENTINVENTORY]: Failed to find user " + remoteClient.AgentId.ToString());
486 return;
487 }
488
489 // is going through the root folder really the best way?
490 // this triggers a tree walk to find and remove the item. 8-(
491 // since this only happens in Trash (in theory) shouldn't we grab
492 // the trash folder directly instead of RootFolder?
493 if (userInfo.RootFolder != null)
494 {
495 InventoryItemBase item = userInfo.RootFolder.HasItem(itemID);
496 if (item != null)
497 {
498 userInfo.DeleteItem(remoteClient.AgentId, item);
499 }
500 }
501 }
502
503 private void RemoveInventoryFolder(IClientAPI remoteClient, LLUUID folderID)
504 {
505 CachedUserInfo userInfo
506 = CommsManager.UserProfileCacheService.GetUserDetails(remoteClient.AgentId);
507 if (userInfo == null)
508 {
509 m_log.Error("[AGENTINVENTORY]: Failed to find user " + remoteClient.AgentId.ToString());
510 return;
511 }
512
513 if (userInfo.RootFolder != null)
514 {
515 InventoryItemBase folder = userInfo.RootFolder.HasItem(folderID);
516 if (folder != null)
517 {
518 // doesn't work just yet, commented out. WIll fix in next patch.
519 // userInfo.DeleteItem(remoteClient.AgentId, folder);
520 }
521 }
522 }
523
479 private SceneObjectGroup GetGroupByPrim(uint localID) 524 private SceneObjectGroup GetGroupByPrim(uint localID)
480 { 525 {
481 List<EntityBase> EntitieList = GetEntities(); 526 List<EntityBase> EntitieList = GetEntities();
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index d3b051f..7af3f5b 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -1397,6 +1397,8 @@ namespace OpenSim.Region.Environment.Scenes
1397 client.OnUpdateInventoryItem += UpdateInventoryItemAsset; 1397 client.OnUpdateInventoryItem += UpdateInventoryItemAsset;
1398 client.OnCopyInventoryItem += CopyInventoryItem; 1398 client.OnCopyInventoryItem += CopyInventoryItem;
1399 client.OnMoveInventoryItem += MoveInventoryItem; 1399 client.OnMoveInventoryItem += MoveInventoryItem;
1400 client.OnRemoveInventoryItem += RemoveInventoryItem;
1401 client.OnRemoveInventoryFolder += RemoveInventoryFolder;
1400 // client.OnAssetUploadRequest += CommsManager.TransactionsManager.HandleUDPUploadRequest; 1402 // client.OnAssetUploadRequest += CommsManager.TransactionsManager.HandleUDPUploadRequest;
1401 // client.OnXferReceive += CommsManager.TransactionsManager.HandleXfer; 1403 // client.OnXferReceive += CommsManager.TransactionsManager.HandleXfer;
1402 client.OnRezScript += RezScript; 1404 client.OnRezScript += RezScript;