aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorMelanie2012-01-28 00:18:12 +0000
committerMelanie2012-01-28 00:18:12 +0000
commit7352aea9ac82c0c1a580ffd00d4436a8ea98f2b6 (patch)
treee09e0fde68b645af20a37608bc45a0a6e9417cd0
parentAdd OS_NPC_SENSE_AS_AGENT option to osNpcCreate(). (diff)
downloadopensim-SC_OLD-7352aea9ac82c0c1a580ffd00d4436a8ea98f2b6.zip
opensim-SC_OLD-7352aea9ac82c0c1a580ffd00d4436a8ea98f2b6.tar.gz
opensim-SC_OLD-7352aea9ac82c0c1a580ffd00d4436a8ea98f2b6.tar.bz2
opensim-SC_OLD-7352aea9ac82c0c1a580ffd00d4436a8ea98f2b6.tar.xz
Remove IClientAPI from the money module. It was only used to pass in the
agent id anyway
-rw-r--r--OpenSim/Framework/IMoneyModule.cs4
-rw-r--r--OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs4
-rw-r--r--OpenSim/Region/ClientStack/Linden/Caps/NewFileAgentInventoryVariablePriceModule.cs4
-rw-r--r--OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetTransactionModule.cs2
-rw-r--r--OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs2
-rw-r--r--OpenSim/Region/OptionalModules/World/MoneyModule/SampleMoneyModule.cs4
6 files changed, 10 insertions, 10 deletions
diff --git a/OpenSim/Framework/IMoneyModule.cs b/OpenSim/Framework/IMoneyModule.cs
index 3d4873d..1e09728 100644
--- a/OpenSim/Framework/IMoneyModule.cs
+++ b/OpenSim/Framework/IMoneyModule.cs
@@ -36,8 +36,8 @@ namespace OpenSim.Framework
36 int amount); 36 int amount);
37 37
38 int GetBalance(UUID agentID); 38 int GetBalance(UUID agentID);
39 bool UploadCovered(IClientAPI client, int amount); 39 bool UploadCovered(UUID agentID, int amount);
40 bool AmountCovered(IClientAPI client, int amount); 40 bool AmountCovered(UUID agentID, int amount);
41 void ApplyCharge(UUID agentID, int amount, string text); 41 void ApplyCharge(UUID agentID, int amount, string text);
42 void ApplyUploadCharge(UUID agentID, int amount, string text); 42 void ApplyUploadCharge(UUID agentID, int amount, string text);
43 43
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs
index 2347cf2..7bc59fc 100644
--- a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs
@@ -366,7 +366,7 @@ namespace OpenSim.Region.ClientStack.Linden
366 366
367 if (mm != null) 367 if (mm != null)
368 { 368 {
369 if (!mm.UploadCovered(client, mm.UploadCharge)) 369 if (!mm.UploadCovered(client.AgentId, mm.UploadCharge))
370 { 370 {
371 if (client != null) 371 if (client != null)
372 client.SendAgentAlertMessage("Unable to upload asset. Insufficient funds.", false); 372 client.SendAgentAlertMessage("Unable to upload asset. Insufficient funds.", false);
@@ -1018,4 +1018,4 @@ namespace OpenSim.Region.ClientStack.Linden
1018 fs.Close(); 1018 fs.Close();
1019 } 1019 }
1020 } 1020 }
1021} \ No newline at end of file 1021}
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/NewFileAgentInventoryVariablePriceModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/NewFileAgentInventoryVariablePriceModule.cs
index b2f04f9..aed03b3 100644
--- a/OpenSim/Region/ClientStack/Linden/Caps/NewFileAgentInventoryVariablePriceModule.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/NewFileAgentInventoryVariablePriceModule.cs
@@ -147,7 +147,7 @@ namespace OpenSim.Region.ClientStack.Linden
147 { 147 {
148 if (m_scene.TryGetClient(agentID, out client)) 148 if (m_scene.TryGetClient(agentID, out client))
149 { 149 {
150 if (!mm.UploadCovered(client, mm.UploadCharge)) 150 if (!mm.UploadCovered(client.AgentId, mm.UploadCharge))
151 { 151 {
152 if (client != null) 152 if (client != null)
153 client.SendAgentAlertMessage("Unable to upload asset. Insufficient funds.", false); 153 client.SendAgentAlertMessage("Unable to upload asset. Insufficient funds.", false);
@@ -268,4 +268,4 @@ namespace OpenSim.Region.ClientStack.Linden
268 268
269 } 269 }
270 } 270 }
271} \ No newline at end of file 271}
diff --git a/OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetTransactionModule.cs b/OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetTransactionModule.cs
index a28d5d7..95e3aec 100644
--- a/OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetTransactionModule.cs
+++ b/OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetTransactionModule.cs
@@ -246,7 +246,7 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction
246 246
247 if (mm != null) 247 if (mm != null)
248 { 248 {
249 if (!mm.UploadCovered(remoteClient, mm.UploadCharge)) 249 if (!mm.UploadCovered(remoteClient.AgentId, mm.UploadCharge))
250 { 250 {
251 remoteClient.SendAgentAlertMessage("Unable to upload asset. Insufficient funds.", false); 251 remoteClient.SendAgentAlertMessage("Unable to upload asset. Insufficient funds.", false);
252 return; 252 return;
diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs
index 740dbdd..b60cd42 100644
--- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs
+++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs
@@ -713,7 +713,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
713 if (money != null) 713 if (money != null)
714 { 714 {
715 // do the transaction, that is if the agent has got sufficient funds 715 // do the transaction, that is if the agent has got sufficient funds
716 if (!money.AmountCovered(remoteClient, money.GroupCreationCharge)) { 716 if (!money.AmountCovered(remoteClient.AgentId, money.GroupCreationCharge)) {
717 remoteClient.SendCreateGroupReply(UUID.Zero, false, "You have got issuficient funds to create a group."); 717 remoteClient.SendCreateGroupReply(UUID.Zero, false, "You have got issuficient funds to create a group.");
718 return UUID.Zero; 718 return UUID.Zero;
719 } 719 }
diff --git a/OpenSim/Region/OptionalModules/World/MoneyModule/SampleMoneyModule.cs b/OpenSim/Region/OptionalModules/World/MoneyModule/SampleMoneyModule.cs
index 8fc50ff..9c838d0 100644
--- a/OpenSim/Region/OptionalModules/World/MoneyModule/SampleMoneyModule.cs
+++ b/OpenSim/Region/OptionalModules/World/MoneyModule/SampleMoneyModule.cs
@@ -775,11 +775,11 @@ namespace OpenSim.Region.OptionalModules.World.MoneyModule
775 // Please do not refactor these to be just one method 775 // Please do not refactor these to be just one method
776 // Existing implementations need the distinction 776 // Existing implementations need the distinction
777 // 777 //
778 public bool UploadCovered(IClientAPI client, int amount) 778 public bool UploadCovered(UUID agentID, int amount)
779 { 779 {
780 return true; 780 return true;
781 } 781 }
782 public bool AmountCovered(IClientAPI client, int amount) 782 public bool AmountCovered(UUID agentID, int amount)
783 { 783 {
784 return true; 784 return true;
785 } 785 }