aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine
diff options
context:
space:
mode:
authorMelanie Thielker2016-07-18 11:12:14 +0100
committerMelanie Thielker2016-07-18 11:12:14 +0100
commit2cffa71be20fe6d35d7ba4d54d4fd3476dd68cda (patch)
tree874aacb99103723bc028a71a305a24c9c40031d2 /OpenSim/Region/ScriptEngine
parentdont try dequeues if didnt reacquired lock (diff)
downloadopensim-SC-2cffa71be20fe6d35d7ba4d54d4fd3476dd68cda.zip
opensim-SC-2cffa71be20fe6d35d7ba4d54d4fd3476dd68cda.tar.gz
opensim-SC-2cffa71be20fe6d35d7ba4d54d4fd3476dd68cda.tar.bz2
opensim-SC-2cffa71be20fe6d35d7ba4d54d4fd3476dd68cda.tar.xz
Add some additional checks to llTransferLindenDollars.
Diffstat (limited to 'OpenSim/Region/ScriptEngine')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs22
1 files changed, 20 insertions, 2 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index 064eb0a..6d2e2c8 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -15678,6 +15678,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
15678 15678
15679 try 15679 try
15680 { 15680 {
15681 if (amount <= 0)
15682 {
15683 replydata = "INVALID_AMOUNT";
15684 return;
15685 }
15686
15681 TaskInventoryItem item = m_item; 15687 TaskInventoryItem item = m_item;
15682 if (item == null) 15688 if (item == null)
15683 { 15689 {
@@ -15685,6 +15691,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
15685 return; 15691 return;
15686 } 15692 }
15687 15693
15694 if (m_host.OwnerID == m_host.GroupID)
15695 {
15696 replydata = "GROUP_OWNED";
15697 return;
15698 }
15699
15688 m_host.AddScriptLPS(1); 15700 m_host.AddScriptLPS(1);
15689 15701
15690 if (item.PermsGranter == UUID.Zero) 15702 if (item.PermsGranter == UUID.Zero)
@@ -15707,6 +15719,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
15707 return; 15719 return;
15708 } 15720 }
15709 15721
15722 UserAccount account = World.UserAccountService.GetUserAccount(World.RegionInfo.ScopeID, toID);
15723 if (account == null)
15724 {
15725 replydata = "LINDENDOLLAR_ENTITYDOESNOTEXIST";
15726 return;
15727 }
15728
15710 IMoneyModule money = World.RequestModuleInterface<IMoneyModule>(); 15729 IMoneyModule money = World.RequestModuleInterface<IMoneyModule>();
15711 15730
15712 if (money == null) 15731 if (money == null)
@@ -15716,8 +15735,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
15716 } 15735 }
15717 15736
15718 string reason; 15737 string reason;
15719 bool result = money.ObjectGiveMoney( 15738 bool result = money.ObjectGiveMoney( m_host.ParentGroup.RootPart.UUID, m_host.ParentGroup.RootPart.OwnerID, toID, amount, txn, out reason);
15720 m_host.ParentGroup.RootPart.UUID, m_host.ParentGroup.RootPart.OwnerID, toID, amount, txn, out reason);
15721 15739
15722 if (result) 15740 if (result)
15723 { 15741 {