aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs66
1 files changed, 33 insertions, 33 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index 4ed6d75..9df04df 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -3039,42 +3039,40 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3039 return src.ToLower(); 3039 return src.ToLower();
3040 } 3040 }
3041 3041
3042 public LSL_Integer llGiveMoney(string destination, int amount) 3042 public void llGiveMoney(string destination, int amount)
3043 { 3043 {
3044 m_host.AddScriptLPS(1); 3044 Util.FireAndForget(x =>
3045
3046 if (m_item.PermsGranter == UUID.Zero)
3047 return 0;
3048
3049 if ((m_item.PermsMask & ScriptBaseClass.PERMISSION_DEBIT) == 0)
3050 { 3045 {
3051 LSLError("No permissions to give money"); 3046 m_host.AddScriptLPS(1);
3052 return 0;
3053 }
3054 3047
3055 UUID toID = new UUID(); 3048 if (m_item.PermsGranter == UUID.Zero)
3049 return;
3056 3050
3057 if (!UUID.TryParse(destination, out toID)) 3051 if ((m_item.PermsMask & ScriptBaseClass.PERMISSION_DEBIT) == 0)
3058 { 3052 {
3059 LSLError("Bad key in llGiveMoney"); 3053 LSLError("No permissions to give money");
3060 return 0; 3054 return;
3061 } 3055 }
3062 3056
3063 IMoneyModule money = World.RequestModuleInterface<IMoneyModule>(); 3057 UUID toID = new UUID();
3064 3058
3065 if (money == null) 3059 if (!UUID.TryParse(destination, out toID))
3066 { 3060 {
3067 NotImplemented("llGiveMoney"); 3061 LSLError("Bad key in llGiveMoney");
3068 return 0; 3062 return;
3069 } 3063 }
3070 3064
3071 bool result = money.ObjectGiveMoney( 3065 IMoneyModule money = World.RequestModuleInterface<IMoneyModule>();
3072 m_host.ParentGroup.RootPart.UUID, m_host.ParentGroup.RootPart.OwnerID, toID, amount,UUID.Zero);
3073 3066
3074 if (result) 3067 if (money == null)
3075 return 1; 3068 {
3069 NotImplemented("llGiveMoney");
3070 return;
3071 }
3076 3072
3077 return 0; 3073 money.ObjectGiveMoney(
3074 m_host.ParentGroup.RootPart.UUID, m_host.ParentGroup.RootPart.OwnerID, toID, amount,UUID.Zero);
3075 });
3078 } 3076 }
3079 3077
3080 public void llMakeExplosion(int particles, double scale, double vel, double lifetime, double arc, string texture, LSL_Vector offset) 3078 public void llMakeExplosion(int particles, double scale, double vel, double lifetime, double arc, string texture, LSL_Vector offset)
@@ -7330,7 +7328,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7330 { 7328 {
7331 m_host.AddScriptLPS(1); 7329 m_host.AddScriptLPS(1);
7332 IXMLRPC xmlrpcMod = m_ScriptEngine.World.RequestModuleInterface<IXMLRPC>(); 7330 IXMLRPC xmlrpcMod = m_ScriptEngine.World.RequestModuleInterface<IXMLRPC>();
7333 if (xmlrpcMod.IsEnabled()) 7331 if (xmlrpcMod != null && xmlrpcMod.IsEnabled())
7334 { 7332 {
7335 UUID channelID = xmlrpcMod.OpenXMLRPCChannel(m_host.LocalId, m_item.ItemID, UUID.Zero); 7333 UUID channelID = xmlrpcMod.OpenXMLRPCChannel(m_host.LocalId, m_item.ItemID, UUID.Zero);
7336 IXmlRpcRouter xmlRpcRouter = m_ScriptEngine.World.RequestModuleInterface<IXmlRpcRouter>(); 7334 IXmlRpcRouter xmlRpcRouter = m_ScriptEngine.World.RequestModuleInterface<IXmlRpcRouter>();
@@ -7362,6 +7360,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7362 m_host.AddScriptLPS(1); 7360 m_host.AddScriptLPS(1);
7363 IXMLRPC xmlrpcMod = m_ScriptEngine.World.RequestModuleInterface<IXMLRPC>(); 7361 IXMLRPC xmlrpcMod = m_ScriptEngine.World.RequestModuleInterface<IXMLRPC>();
7364 ScriptSleep(3000); 7362 ScriptSleep(3000);
7363 if (xmlrpcMod == null)
7364 return "";
7365 return (xmlrpcMod.SendRemoteData(m_host.LocalId, m_item.ItemID, channel, dest, idata, sdata)).ToString(); 7365 return (xmlrpcMod.SendRemoteData(m_host.LocalId, m_item.ItemID, channel, dest, idata, sdata)).ToString();
7366 } 7366 }
7367 7367
@@ -7369,7 +7369,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7369 { 7369 {
7370 m_host.AddScriptLPS(1); 7370 m_host.AddScriptLPS(1);
7371 IXMLRPC xmlrpcMod = m_ScriptEngine.World.RequestModuleInterface<IXMLRPC>(); 7371 IXMLRPC xmlrpcMod = m_ScriptEngine.World.RequestModuleInterface<IXMLRPC>();
7372 xmlrpcMod.RemoteDataReply(channel, message_id, sdata, idata); 7372 if (xmlrpcMod != null)
7373 xmlrpcMod.RemoteDataReply(channel, message_id, sdata, idata);
7373 ScriptSleep(3000); 7374 ScriptSleep(3000);
7374 } 7375 }
7375 7376
@@ -7384,7 +7385,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7384 } 7385 }
7385 7386
7386 IXMLRPC xmlrpcMod = m_ScriptEngine.World.RequestModuleInterface<IXMLRPC>(); 7387 IXMLRPC xmlrpcMod = m_ScriptEngine.World.RequestModuleInterface<IXMLRPC>();
7387 xmlrpcMod.CloseXMLRPCChannel((UUID)channel); 7388 if (xmlrpcMod != null)
7389 xmlrpcMod.CloseXMLRPCChannel((UUID)channel);
7388 ScriptSleep(1000); 7390 ScriptSleep(1000);
7389 } 7391 }
7390 7392
@@ -7797,8 +7799,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7797 m_host.AddScriptLPS(1); 7799 m_host.AddScriptLPS(1);
7798 7800
7799 setLinkPrimParams(linknumber, rules, "llSetLinkPrimitiveParamsFast"); 7801 setLinkPrimParams(linknumber, rules, "llSetLinkPrimitiveParamsFast");
7800
7801 ScriptSleep(200);
7802 } 7802 }
7803 7803
7804 private void setLinkPrimParams(int linknumber, LSL_List rules, string originFunc) 7804 private void setLinkPrimParams(int linknumber, LSL_List rules, string originFunc)
@@ -12677,7 +12677,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
12677 } 12677 }
12678 12678
12679 bool result = money.ObjectGiveMoney( 12679 bool result = money.ObjectGiveMoney(
12680 m_host.ParentGroup.RootPart.UUID, m_host.ParentGroup.RootPart.OwnerID, toID, amount,UUID.Zero); 12680 m_host.ParentGroup.RootPart.UUID, m_host.ParentGroup.RootPart.OwnerID, toID, amount, txn);
12681 12681
12682 if (result) 12682 if (result)
12683 { 12683 {