diff options
-rw-r--r-- | OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs index ddb69c4..4ba8254 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs | |||
@@ -489,6 +489,7 @@ namespace OpenSim.Region.ClientStack.Linden | |||
489 | cost = (uint)baseCost; | 489 | cost = (uint)baseCost; |
490 | } | 490 | } |
491 | 491 | ||
492 | // check funds | ||
492 | if (mm != null) | 493 | if (mm != null) |
493 | { | 494 | { |
494 | if (!mm.UploadCovered(client.AgentId, (int)cost)) | 495 | if (!mm.UploadCovered(client.AgentId, (int)cost)) |
@@ -565,6 +566,21 @@ namespace OpenSim.Region.ClientStack.Linden | |||
565 | sbyte assType = 0; | 566 | sbyte assType = 0; |
566 | sbyte inType = 0; | 567 | sbyte inType = 0; |
567 | 568 | ||
569 | IClientAPI client = null; | ||
570 | |||
571 | IMoneyModule mm = m_Scene.RequestModuleInterface<IMoneyModule>(); | ||
572 | if (mm != null) | ||
573 | { | ||
574 | // make sure client still has enougth credit | ||
575 | if (!mm.UploadCovered(m_HostCapsObj.AgentID, (int)cost)) | ||
576 | { | ||
577 | m_Scene.TryGetClient(m_HostCapsObj.AgentID, out client); | ||
578 | if (client != null) | ||
579 | client.SendAgentAlertMessage("Unable to upload asset. Insufficient funds.", false); | ||
580 | return; | ||
581 | } | ||
582 | } | ||
583 | |||
568 | if (inventoryType == "sound") | 584 | if (inventoryType == "sound") |
569 | { | 585 | { |
570 | inType = 1; | 586 | inType = 1; |