make sure client still has money at upload
parent
7f5b1182ef
commit
c3666c9ec3
OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps
|
@ -489,6 +489,7 @@ namespace OpenSim.Region.ClientStack.Linden
|
||||||
cost = (uint)baseCost;
|
cost = (uint)baseCost;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// check funds
|
||||||
if (mm != null)
|
if (mm != null)
|
||||||
{
|
{
|
||||||
if (!mm.UploadCovered(client.AgentId, (int)cost))
|
if (!mm.UploadCovered(client.AgentId, (int)cost))
|
||||||
|
@ -565,6 +566,21 @@ namespace OpenSim.Region.ClientStack.Linden
|
||||||
sbyte assType = 0;
|
sbyte assType = 0;
|
||||||
sbyte inType = 0;
|
sbyte inType = 0;
|
||||||
|
|
||||||
|
IClientAPI client = null;
|
||||||
|
|
||||||
|
IMoneyModule mm = m_Scene.RequestModuleInterface<IMoneyModule>();
|
||||||
|
if (mm != null)
|
||||||
|
{
|
||||||
|
// make sure client still has enougth credit
|
||||||
|
if (!mm.UploadCovered(m_HostCapsObj.AgentID, (int)cost))
|
||||||
|
{
|
||||||
|
m_Scene.TryGetClient(m_HostCapsObj.AgentID, out client);
|
||||||
|
if (client != null)
|
||||||
|
client.SendAgentAlertMessage("Unable to upload asset. Insufficient funds.", false);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (inventoryType == "sound")
|
if (inventoryType == "sound")
|
||||||
{
|
{
|
||||||
inType = 1;
|
inType = 1;
|
||||||
|
|
Loading…
Reference in New Issue