aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Modules/Avatar/Currency
diff options
context:
space:
mode:
authorJustin Clarke Casey2008-09-06 03:22:09 +0000
committerJustin Clarke Casey2008-09-06 03:22:09 +0000
commitbb2b1b1f6165d816f43f19c0fb03229a11ca0f54 (patch)
treeaf02c72ef972ad34f735a4ff16bcff87949fa527 /OpenSim/Region/Environment/Modules/Avatar/Currency
parentRevert changes to TestStringsWithEscapedQuotesAndComments() so it will work i... (diff)
downloadopensim-SC_OLD-bb2b1b1f6165d816f43f19c0fb03229a11ca0f54.zip
opensim-SC_OLD-bb2b1b1f6165d816f43f19c0fb03229a11ca0f54.tar.gz
opensim-SC_OLD-bb2b1b1f6165d816f43f19c0fb03229a11ca0f54.tar.bz2
opensim-SC_OLD-bb2b1b1f6165d816f43f19c0fb03229a11ca0f54.tar.xz
* Add SampleMoneyModule patch from mantis #2079
* Thanks noralbion
Diffstat (limited to 'OpenSim/Region/Environment/Modules/Avatar/Currency')
-rw-r--r--OpenSim/Region/Environment/Modules/Avatar/Currency/SampleMoney/SampleMoneyModule.cs30
1 files changed, 19 insertions, 11 deletions
diff --git a/OpenSim/Region/Environment/Modules/Avatar/Currency/SampleMoney/SampleMoneyModule.cs b/OpenSim/Region/Environment/Modules/Avatar/Currency/SampleMoney/SampleMoneyModule.cs
index 9f01ad8..2a0bba4 100644
--- a/OpenSim/Region/Environment/Modules/Avatar/Currency/SampleMoney/SampleMoneyModule.cs
+++ b/OpenSim/Region/Environment/Modules/Avatar/Currency/SampleMoney/SampleMoneyModule.cs
@@ -811,24 +811,33 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney
811 811
812 LLUUID agentId = LLUUID.Zero; 812 LLUUID agentId = LLUUID.Zero;
813 LLUUID soundId = LLUUID.Zero; 813 LLUUID soundId = LLUUID.Zero;
814 LLUUID regionId = LLUUID.Zero;
814 815
815 Helpers.TryParse((string) requestData["agentId"], out agentId); 816 Helpers.TryParse((string) requestData["agentId"], out agentId);
816 Helpers.TryParse((string) requestData["soundId"], out soundId); 817 Helpers.TryParse((string) requestData["soundId"], out soundId);
818 Helpers.TryParse((string) requestData["regionId"], out regionId);
817 string text = (string) requestData["text"]; 819 string text = (string) requestData["text"];
818 string secret = (string) requestData["secret"]; 820 string secret = (string) requestData["secret"];
819 821
820 Scene userScene = GetRandomScene(); 822 Scene userScene = GetSceneByUUID(regionId);
821 if (userScene.RegionInfo.regionSecret.ToString() == secret) 823 if(userScene != null)
822 { 824 {
823 IClientAPI client = LocateClientObject(agentId); 825 if (userScene.RegionInfo.regionSecret.ToString() == secret)
824
825 if (client != null)
826 { 826 {
827 if (soundId != LLUUID.Zero) 827
828 client.SendPlayAttachedSound(soundId, LLUUID.Zero, LLUUID.Zero, 1.0f, 0); 828 IClientAPI client = LocateClientObject(agentId);
829 client.SendBlueBoxMessage(LLUUID.Zero, LLUUID.Zero, "", text); 829 if (client != null)
830 retparam.Add("success", true); 830 {
831 } 831 if (soundId != LLUUID.Zero)
832 client.SendPlayAttachedSound(soundId, LLUUID.Zero, LLUUID.Zero, 1.0f, 0);
833 client.SendBlueBoxMessage(LLUUID.Zero, LLUUID.Zero, "", text);
834 retparam.Add("success", true);
835 }
836 else
837 {
838 retparam.Add("success", false);
839 }
840 }
832 else 841 else
833 { 842 {
834 retparam.Add("success", false); 843 retparam.Add("success", false);
@@ -839,7 +848,6 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney
839 retparam.Add("success", false); 848 retparam.Add("success", false);
840 } 849 }
841 ret.Value = retparam; 850 ret.Value = retparam;
842
843 return ret; 851 return ret;
844 } 852 }
845 853