diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Framework/Communications/Capabilities/Caps.cs | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/OpenSim/Framework/Communications/Capabilities/Caps.cs b/OpenSim/Framework/Communications/Capabilities/Caps.cs index 24fe0f4..338604d 100644 --- a/OpenSim/Framework/Communications/Capabilities/Caps.cs +++ b/OpenSim/Framework/Communications/Capabilities/Caps.cs | |||
@@ -34,6 +34,9 @@ using libsecondlife; | |||
34 | using log4net; | 34 | using log4net; |
35 | using OpenSim.Framework.Communications.Cache; | 35 | using OpenSim.Framework.Communications.Cache; |
36 | using OpenSim.Framework.Servers; | 36 | using OpenSim.Framework.Servers; |
37 | using OpenSim.Framework; | ||
38 | using OpenSim.Region.Environment.Interfaces; | ||
39 | using OpenSim.Region.Environment.Scenes; | ||
37 | 40 | ||
38 | namespace OpenSim.Framework.Communications.Capabilities | 41 | namespace OpenSim.Framework.Communications.Capabilities |
39 | { | 42 | { |
@@ -606,6 +609,29 @@ namespace OpenSim.Framework.Communications.Capabilities | |||
606 | /// <returns></returns> | 609 | /// <returns></returns> |
607 | public LLSDAssetUploadResponse NewAgentInventoryRequest(LLSDAssetUploadRequest llsdRequest) | 610 | public LLSDAssetUploadResponse NewAgentInventoryRequest(LLSDAssetUploadRequest llsdRequest) |
608 | { | 611 | { |
612 | if (llsdRequest.asset_type == "texture" || | ||
613 | llsdRequest.asset_type == "animation" || | ||
614 | llsdRequest.asset_type == "sound") | ||
615 | { | ||
616 | IClientAPI client = GetClient(m_agentID); | ||
617 | Scene scene = (Scene)client.Scene; | ||
618 | |||
619 | IMoneyModule mm = scene.RequestModuleInterface<IMoneyModule>(); | ||
620 | |||
621 | if(mm != null) | ||
622 | { | ||
623 | if(!mm.UploadCovered(client)) | ||
624 | { | ||
625 | client.SendAgentAlertMessage("Unable to upload asset. Insufficient funds.", false); | ||
626 | |||
627 | LLSDAssetUploadResponse errorResponse = new LLSDAssetUploadResponse(); | ||
628 | errorResponse.uploader = ""; | ||
629 | errorResponse.state = "error"; | ||
630 | return errorResponse; | ||
631 | } | ||
632 | } | ||
633 | } | ||
634 | |||
609 | //Console.WriteLine("asset upload request via CAPS" + llsdRequest.inventory_type +" , "+ llsdRequest.asset_type); | 635 | //Console.WriteLine("asset upload request via CAPS" + llsdRequest.inventory_type +" , "+ llsdRequest.asset_type); |
610 | 636 | ||
611 | string assetName = llsdRequest.name; | 637 | string assetName = llsdRequest.name; |