aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes
diff options
context:
space:
mode:
authorBrian McBee2007-12-08 19:13:10 +0000
committerBrian McBee2007-12-08 19:13:10 +0000
commitbeca2373e15c0541e83f01abedfe7d6bfa469c8b (patch)
treefbee508dbcd24ef171cdc307fcf22318cf4150d3 /OpenSim/Region/Environment/Scenes
parent* Added back the regionup code so people in nearby sims can see a downed sim ... (diff)
downloadopensim-SC_OLD-beca2373e15c0541e83f01abedfe7d6bfa469c8b.zip
opensim-SC_OLD-beca2373e15c0541e83f01abedfe7d6bfa469c8b.tar.gz
opensim-SC_OLD-beca2373e15c0541e83f01abedfe7d6bfa469c8b.tar.bz2
opensim-SC_OLD-beca2373e15c0541e83f01abedfe7d6bfa469c8b.tar.xz
Allow moving, deleting, and restoring objects in inventory.
Note: only tested in grid mode, and emptying trash is still not implemented.
Diffstat (limited to 'OpenSim/Region/Environment/Scenes')
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.Inventory.cs40
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.cs1
2 files changed, 41 insertions, 0 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
index ac504e1..e373eda 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
@@ -236,6 +236,46 @@ namespace OpenSim.Region.Environment.Scenes
236 return asset; 236 return asset;
237 } 237 }
238 238
239 public void MoveInventoryItem(IClientAPI remoteClient,LLUUID folderID, LLUUID itemID, int length, string newName)
240 {
241 MainLog.Instance.Verbose("INVENTORY", "Moving item for " + remoteClient.AgentId.ToStringHyphenated());
242 CachedUserInfo userInfo = CommsManager.UserProfileCacheService.GetUserDetails(remoteClient.AgentId);
243 if (userInfo == null)
244 {
245 MainLog.Instance.Warn("INVENTORY", "Failed to find user " + remoteClient.AgentId.ToString());
246 return;
247 }
248
249 if (userInfo.RootFolder != null)
250 {
251 InventoryItemBase item = userInfo.RootFolder.HasItem(itemID);
252 if (item != null)
253 {
254 if (newName != "")
255 {
256 item.inventoryName = newName;
257 }
258 item.parentFolderID = folderID;
259 userInfo.DeleteItem(remoteClient.AgentId, item);
260
261 // TODO: preserve current permissions?
262 AddInventoryItem(remoteClient, item);
263 }
264 else
265 {
266 MainLog.Instance.Warn("INVENTORY", "Failed to find item " + itemID.ToString());
267 return;
268 }
269 }
270 else
271 {
272 MainLog.Instance.Warn("INVENTORY", "Failed to find item " + itemID.ToString() + ", no root folder");
273 return;
274 }
275
276
277 }
278
239 private void CreateNewInventoryItem(IClientAPI remoteClient, LLUUID folderID, uint callbackID, 279 private void CreateNewInventoryItem(IClientAPI remoteClient, LLUUID folderID, uint callbackID,
240 AssetBase asset, uint nextOwnerMask) 280 AssetBase asset, uint nextOwnerMask)
241 { 281 {
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index b733522..eb8a6a2 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -976,6 +976,7 @@ namespace OpenSim.Region.Environment.Scenes
976 client.OnFetchInventory += CommsManager.UserProfileCacheService.HandleFetchInventory; 976 client.OnFetchInventory += CommsManager.UserProfileCacheService.HandleFetchInventory;
977 client.OnUpdateInventoryItem += UpdateInventoryItemAsset; 977 client.OnUpdateInventoryItem += UpdateInventoryItemAsset;
978 client.OnCopyInventoryItem += CopyInventoryItem; 978 client.OnCopyInventoryItem += CopyInventoryItem;
979 client.OnMoveInventoryItem += MoveInventoryItem;
979 client.OnAssetUploadRequest += CommsManager.TransactionsManager.HandleUDPUploadRequest; 980 client.OnAssetUploadRequest += CommsManager.TransactionsManager.HandleUDPUploadRequest;
980 client.OnXferReceive += CommsManager.TransactionsManager.HandleXfer; 981 client.OnXferReceive += CommsManager.TransactionsManager.HandleXfer;
981 client.OnRezScript += RezScript; 982 client.OnRezScript += RezScript;