diff options
author | Charles Krinke | 2008-05-23 01:38:20 +0000 |
---|---|---|
committer | Charles Krinke | 2008-05-23 01:38:20 +0000 |
commit | 7dcaa409b34288a5743483a53a8f4e87994edda8 (patch) | |
tree | ae26cb8f0b93a72001bc0ea73884f15bf5122201 /OpenSim/Region/Environment/Scenes | |
parent | * minor: Remove unused variables causing warnings in Scene (diff) | |
download | opensim-SC_OLD-7dcaa409b34288a5743483a53a8f4e87994edda8.zip opensim-SC_OLD-7dcaa409b34288a5743483a53a8f4e87994edda8.tar.gz opensim-SC_OLD-7dcaa409b34288a5743483a53a8f4e87994edda8.tar.bz2 opensim-SC_OLD-7dcaa409b34288a5743483a53a8f4e87994edda8.tar.xz |
Thank you kindly, Melanie, for a patch which:
Previously, upload charging was possible only for UPD uploads.
This is because UDP uploads are charged by the viewer, while in CAPS,
this was changed to be server side, so hackers couldn't avoid
paying the upload charge. This patch adds a method to allow
implementation of this serverside charge.
Diffstat (limited to 'OpenSim/Region/Environment/Scenes')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/Scene.Inventory.cs | 11 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Scenes/Scene.cs | 2 |
2 files changed, 12 insertions, 1 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs index 4f65beb..0e19d96 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs | |||
@@ -59,6 +59,17 @@ namespace OpenSim.Region.Environment.Scenes | |||
59 | } | 59 | } |
60 | } | 60 | } |
61 | 61 | ||
62 | public void AddUploadedInventoryItem(LLUUID agentID, InventoryItemBase item) | ||
63 | { | ||
64 | IMoneyModule money=RequestModuleInterface<IMoneyModule>(); | ||
65 | if(money != null) | ||
66 | { | ||
67 | money.ApplyUploadCharge(agentID); | ||
68 | } | ||
69 | |||
70 | AddInventoryItem(agentID, item); | ||
71 | } | ||
72 | |||
62 | /// <summary> | 73 | /// <summary> |
63 | /// Add an inventory item to an avatar's inventory. | 74 | /// Add an inventory item to an avatar's inventory. |
64 | /// </summary> | 75 | /// </summary> |
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index ee634d3..774ddfc 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs | |||
@@ -2092,7 +2092,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2092 | 2092 | ||
2093 | EventManager.TriggerOnRegisterCaps(agentId, cap); | 2093 | EventManager.TriggerOnRegisterCaps(agentId, cap); |
2094 | 2094 | ||
2095 | cap.AddNewInventoryItem = AddInventoryItem; | 2095 | cap.AddNewInventoryItem = AddUploadedInventoryItem; |
2096 | cap.ItemUpdatedCall = CapsUpdateInventoryItemAsset; | 2096 | cap.ItemUpdatedCall = CapsUpdateInventoryItemAsset; |
2097 | cap.TaskScriptUpdatedCall = CapsUpdateTaskInventoryScriptAsset; | 2097 | cap.TaskScriptUpdatedCall = CapsUpdateTaskInventoryScriptAsset; |
2098 | cap.CAPSFetchInventoryDescendents = CommsManager.UserProfileCacheService.HandleFetchInventoryDescendentsCAPS; | 2098 | cap.CAPSFetchInventoryDescendents = CommsManager.UserProfileCacheService.HandleFetchInventoryDescendentsCAPS; |