diff options
Diffstat (limited to 'OpenSim/Region/OptionalModules/World/MoneyModule/SampleMoneyModule.cs')
-rw-r--r-- | OpenSim/Region/OptionalModules/World/MoneyModule/SampleMoneyModule.cs | 60 |
1 files changed, 30 insertions, 30 deletions
diff --git a/OpenSim/Region/OptionalModules/World/MoneyModule/SampleMoneyModule.cs b/OpenSim/Region/OptionalModules/World/MoneyModule/SampleMoneyModule.cs index 8565f5a..47edeb9 100644 --- a/OpenSim/Region/OptionalModules/World/MoneyModule/SampleMoneyModule.cs +++ b/OpenSim/Region/OptionalModules/World/MoneyModule/SampleMoneyModule.cs | |||
@@ -151,13 +151,13 @@ namespace OpenSim.Region.OptionalModules.World.MoneyModule | |||
151 | // to the command line parameters you use to start up your client | 151 | // to the command line parameters you use to start up your client |
152 | // This commonly looks like -helperuri http://127.0.0.1:9000/ | 152 | // This commonly looks like -helperuri http://127.0.0.1:9000/ |
153 | 153 | ||
154 | 154 | ||
155 | // Local Server.. enables functionality only. | 155 | // Local Server.. enables functionality only. |
156 | httpServer.AddXmlRPCHandler("getCurrencyQuote", quote_func); | 156 | httpServer.AddXmlRPCHandler("getCurrencyQuote", quote_func); |
157 | httpServer.AddXmlRPCHandler("buyCurrency", buy_func); | 157 | httpServer.AddXmlRPCHandler("buyCurrency", buy_func); |
158 | httpServer.AddXmlRPCHandler("preflightBuyLandPrep", preflightBuyLandPrep_func); | 158 | httpServer.AddXmlRPCHandler("preflightBuyLandPrep", preflightBuyLandPrep_func); |
159 | httpServer.AddXmlRPCHandler("buyLandPrep", landBuy_func); | 159 | httpServer.AddXmlRPCHandler("buyLandPrep", landBuy_func); |
160 | 160 | ||
161 | } | 161 | } |
162 | 162 | ||
163 | if (m_scenel.ContainsKey(scene.RegionInfo.RegionHandle)) | 163 | if (m_scenel.ContainsKey(scene.RegionInfo.RegionHandle)) |
@@ -212,7 +212,7 @@ namespace OpenSim.Region.OptionalModules.World.MoneyModule | |||
212 | 212 | ||
213 | bool give_result = doMoneyTransfer(fromID, toID, amount, 2, description); | 213 | bool give_result = doMoneyTransfer(fromID, toID, amount, 2, description); |
214 | 214 | ||
215 | 215 | ||
216 | BalanceUpdate(fromID, toID, give_result, description); | 216 | BalanceUpdate(fromID, toID, give_result, description); |
217 | 217 | ||
218 | return give_result; | 218 | return give_result; |
@@ -303,7 +303,7 @@ namespace OpenSim.Region.OptionalModules.World.MoneyModule | |||
303 | private bool doMoneyTransfer(UUID Sender, UUID Receiver, int amount, int transactiontype, string description) | 303 | private bool doMoneyTransfer(UUID Sender, UUID Receiver, int amount, int transactiontype, string description) |
304 | { | 304 | { |
305 | bool result = true; | 305 | bool result = true; |
306 | 306 | ||
307 | return result; | 307 | return result; |
308 | } | 308 | } |
309 | 309 | ||
@@ -377,10 +377,10 @@ namespace OpenSim.Region.OptionalModules.World.MoneyModule | |||
377 | else | 377 | else |
378 | { | 378 | { |
379 | m_log.ErrorFormat( | 379 | m_log.ErrorFormat( |
380 | "[MONEY]: Could not resolve user {0}", | 380 | "[MONEY]: Could not resolve user {0}", |
381 | agentID); | 381 | agentID); |
382 | } | 382 | } |
383 | 383 | ||
384 | return String.Empty; | 384 | return String.Empty; |
385 | } | 385 | } |
386 | 386 | ||
@@ -464,7 +464,7 @@ namespace OpenSim.Region.OptionalModules.World.MoneyModule | |||
464 | Hashtable quoteResponse = new Hashtable(); | 464 | Hashtable quoteResponse = new Hashtable(); |
465 | XmlRpcResponse returnval = new XmlRpcResponse(); | 465 | XmlRpcResponse returnval = new XmlRpcResponse(); |
466 | 466 | ||
467 | 467 | ||
468 | Hashtable currencyResponse = new Hashtable(); | 468 | Hashtable currencyResponse = new Hashtable(); |
469 | currencyResponse.Add("estimatedCost", 0); | 469 | currencyResponse.Add("estimatedCost", 0); |
470 | currencyResponse.Add("currencyBuy", amount); | 470 | currencyResponse.Add("currencyBuy", amount); |
@@ -475,7 +475,7 @@ namespace OpenSim.Region.OptionalModules.World.MoneyModule | |||
475 | 475 | ||
476 | returnval.Value = quoteResponse; | 476 | returnval.Value = quoteResponse; |
477 | return returnval; | 477 | return returnval; |
478 | 478 | ||
479 | 479 | ||
480 | 480 | ||
481 | } | 481 | } |
@@ -485,7 +485,7 @@ namespace OpenSim.Region.OptionalModules.World.MoneyModule | |||
485 | // Hashtable requestData = (Hashtable) request.Params[0]; | 485 | // Hashtable requestData = (Hashtable) request.Params[0]; |
486 | // UUID agentId = UUID.Zero; | 486 | // UUID agentId = UUID.Zero; |
487 | // int amount = 0; | 487 | // int amount = 0; |
488 | 488 | ||
489 | XmlRpcResponse returnval = new XmlRpcResponse(); | 489 | XmlRpcResponse returnval = new XmlRpcResponse(); |
490 | Hashtable returnresp = new Hashtable(); | 490 | Hashtable returnresp = new Hashtable(); |
491 | returnresp.Add("success", true); | 491 | returnresp.Add("success", true); |
@@ -536,7 +536,7 @@ namespace OpenSim.Region.OptionalModules.World.MoneyModule | |||
536 | 536 | ||
537 | // UUID agentId = UUID.Zero; | 537 | // UUID agentId = UUID.Zero; |
538 | // int amount = 0; | 538 | // int amount = 0; |
539 | 539 | ||
540 | retparam.Add("success", true); | 540 | retparam.Add("success", true); |
541 | ret.Value = retparam; | 541 | ret.Value = retparam; |
542 | 542 | ||
@@ -553,7 +553,7 @@ namespace OpenSim.Region.OptionalModules.World.MoneyModule | |||
553 | /// <param name="agentID"></param> | 553 | /// <param name="agentID"></param> |
554 | private void CheckExistAndRefreshFunds(UUID agentID) | 554 | private void CheckExistAndRefreshFunds(UUID agentID) |
555 | { | 555 | { |
556 | 556 | ||
557 | } | 557 | } |
558 | 558 | ||
559 | /// <summary> | 559 | /// <summary> |
@@ -564,13 +564,13 @@ namespace OpenSim.Region.OptionalModules.World.MoneyModule | |||
564 | private int GetFundsForAgentID(UUID AgentID) | 564 | private int GetFundsForAgentID(UUID AgentID) |
565 | { | 565 | { |
566 | int returnfunds = 0; | 566 | int returnfunds = 0; |
567 | 567 | ||
568 | return returnfunds; | 568 | return returnfunds; |
569 | } | 569 | } |
570 | 570 | ||
571 | // private void SetLocalFundsForAgentID(UUID AgentID, int amount) | 571 | // private void SetLocalFundsForAgentID(UUID AgentID, int amount) |
572 | // { | 572 | // { |
573 | 573 | ||
574 | // } | 574 | // } |
575 | 575 | ||
576 | #endregion | 576 | #endregion |
@@ -689,7 +689,7 @@ namespace OpenSim.Region.OptionalModules.World.MoneyModule | |||
689 | /// <see cref="OpenSim.Region.Framework.Scenes.EventManager.ClientClosed"/> | 689 | /// <see cref="OpenSim.Region.Framework.Scenes.EventManager.ClientClosed"/> |
690 | public void ClientClosed(UUID AgentID, Scene scene) | 690 | public void ClientClosed(UUID AgentID, Scene scene) |
691 | { | 691 | { |
692 | 692 | ||
693 | } | 693 | } |
694 | 694 | ||
695 | /// <summary> | 695 | /// <summary> |
@@ -708,19 +708,19 @@ namespace OpenSim.Region.OptionalModules.World.MoneyModule | |||
708 | 708 | ||
709 | private void ValidateLandBuy(Object osender, EventManager.LandBuyArgs e) | 709 | private void ValidateLandBuy(Object osender, EventManager.LandBuyArgs e) |
710 | { | 710 | { |
711 | 711 | ||
712 | 712 | ||
713 | lock (e) | 713 | lock (e) |
714 | { | 714 | { |
715 | e.economyValidated = true; | 715 | e.economyValidated = true; |
716 | } | 716 | } |
717 | 717 | ||
718 | 718 | ||
719 | } | 719 | } |
720 | 720 | ||
721 | private void processLandBuy(Object osender, EventManager.LandBuyArgs e) | 721 | private void processLandBuy(Object osender, EventManager.LandBuyArgs e) |
722 | { | 722 | { |
723 | 723 | ||
724 | } | 724 | } |
725 | 725 | ||
726 | /// <summary> | 726 | /// <summary> |
@@ -730,7 +730,7 @@ namespace OpenSim.Region.OptionalModules.World.MoneyModule | |||
730 | /// <param name="e"></param> | 730 | /// <param name="e"></param> |
731 | private void MoneyTransferAction(Object osender, EventManager.MoneyTransferArgs e) | 731 | private void MoneyTransferAction(Object osender, EventManager.MoneyTransferArgs e) |
732 | { | 732 | { |
733 | 733 | ||
734 | } | 734 | } |
735 | 735 | ||
736 | /// <summary> | 736 | /// <summary> |
@@ -739,7 +739,7 @@ namespace OpenSim.Region.OptionalModules.World.MoneyModule | |||
739 | /// <param name="avatar"></param> | 739 | /// <param name="avatar"></param> |
740 | private void MakeChildAgent(ScenePresence avatar) | 740 | private void MakeChildAgent(ScenePresence avatar) |
741 | { | 741 | { |
742 | 742 | ||
743 | } | 743 | } |
744 | 744 | ||
745 | /// <summary> | 745 | /// <summary> |
@@ -748,7 +748,7 @@ namespace OpenSim.Region.OptionalModules.World.MoneyModule | |||
748 | /// <param name="AgentId"></param> | 748 | /// <param name="AgentId"></param> |
749 | private void ClientLoggedOut(UUID AgentId, Scene scene) | 749 | private void ClientLoggedOut(UUID AgentId, Scene scene) |
750 | { | 750 | { |
751 | 751 | ||
752 | } | 752 | } |
753 | 753 | ||
754 | /// <summary> | 754 | /// <summary> |
@@ -768,7 +768,7 @@ namespace OpenSim.Region.OptionalModules.World.MoneyModule | |||
768 | /// <param name="regionID"></param> | 768 | /// <param name="regionID"></param> |
769 | private void AvatarEnteringParcel(ScenePresence avatar, int localLandID, UUID regionID) | 769 | private void AvatarEnteringParcel(ScenePresence avatar, int localLandID, UUID regionID) |
770 | { | 770 | { |
771 | 771 | ||
772 | //m_log.Info("[FRIEND]: " + avatar.Name + " status:" + (!avatar.IsChildAgent).ToString()); | 772 | //m_log.Info("[FRIEND]: " + avatar.Name + " status:" + (!avatar.IsChildAgent).ToString()); |
773 | } | 773 | } |
774 | 774 | ||
@@ -809,12 +809,12 @@ namespace OpenSim.Region.OptionalModules.World.MoneyModule | |||
809 | 809 | ||
810 | Scene s = LocateSceneClientIn(remoteClient.AgentId); | 810 | Scene s = LocateSceneClientIn(remoteClient.AgentId); |
811 | 811 | ||
812 | // Implmenting base sale data checking here so the default OpenSimulator implementation isn't useless | 812 | // Implmenting base sale data checking here so the default OpenSimulator implementation isn't useless |
813 | // combined with other implementations. We're actually validating that the client is sending the data | 813 | // combined with other implementations. We're actually validating that the client is sending the data |
814 | // that it should. In theory, the client should already know what to send here because it'll see it when it | 814 | // that it should. In theory, the client should already know what to send here because it'll see it when it |
815 | // gets the object data. If the data sent by the client doesn't match the object, the viewer probably has an | 815 | // gets the object data. If the data sent by the client doesn't match the object, the viewer probably has an |
816 | // old idea of what the object properties are. Viewer developer Hazim informed us that the base module | 816 | // old idea of what the object properties are. Viewer developer Hazim informed us that the base module |
817 | // didn't check the client sent data against the object do any. Since the base modules are the | 817 | // didn't check the client sent data against the object do any. Since the base modules are the |
818 | // 'crowning glory' examples of good practice.. | 818 | // 'crowning glory' examples of good practice.. |
819 | 819 | ||
820 | // Validate that the object exists in the scene the user is in | 820 | // Validate that the object exists in the scene the user is in |
@@ -824,15 +824,15 @@ namespace OpenSim.Region.OptionalModules.World.MoneyModule | |||
824 | remoteClient.SendAgentAlertMessage("Unable to buy now. The object was not found.", false); | 824 | remoteClient.SendAgentAlertMessage("Unable to buy now. The object was not found.", false); |
825 | return; | 825 | return; |
826 | } | 826 | } |
827 | 827 | ||
828 | // Validate that the client sent the price that the object is being sold for | 828 | // Validate that the client sent the price that the object is being sold for |
829 | if (part.SalePrice != salePrice) | 829 | if (part.SalePrice != salePrice) |
830 | { | 830 | { |
831 | remoteClient.SendAgentAlertMessage("Cannot buy at this price. Buy Failed. If you continue to get this relog.", false); | 831 | remoteClient.SendAgentAlertMessage("Cannot buy at this price. Buy Failed. If you continue to get this relog.", false); |
832 | return; | 832 | return; |
833 | } | 833 | } |
834 | 834 | ||
835 | // Validate that the client sent the proper sale type the object has set | 835 | // Validate that the client sent the proper sale type the object has set |
836 | if (part.ObjectSaleType != saleType) | 836 | if (part.ObjectSaleType != saleType) |
837 | { | 837 | { |
838 | remoteClient.SendAgentAlertMessage("Cannot buy this way. Buy Failed. If you continue to get this relog.", false); | 838 | remoteClient.SendAgentAlertMessage("Cannot buy this way. Buy Failed. If you continue to get this relog.", false); |