aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Framework')
-rw-r--r--OpenSim/Framework/Communications/Capabilities/Caps.cs26
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;
34using log4net; 34using log4net;
35using OpenSim.Framework.Communications.Cache; 35using OpenSim.Framework.Communications.Cache;
36using OpenSim.Framework.Servers; 36using OpenSim.Framework.Servers;
37using OpenSim.Framework;
38using OpenSim.Region.Environment.Interfaces;
39using OpenSim.Region.Environment.Scenes;
37 40
38namespace OpenSim.Framework.Communications.Capabilities 41namespace 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;