aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--CONTRIBUTORS.txt3
-rw-r--r--OpenSim/Region/Environment/Modules/Avatar/Currency/SampleMoney/SampleMoneyModule.cs30
2 files changed, 21 insertions, 12 deletions
diff --git a/CONTRIBUTORS.txt b/CONTRIBUTORS.txt
index be0dddc..8ece7ea 100644
--- a/CONTRIBUTORS.txt
+++ b/CONTRIBUTORS.txt
@@ -45,6 +45,7 @@ Patches
45* alex_carnell 45* alex_carnell
46* webmage (IBM) 46* webmage (IBM)
47* jimbo2120 (IBM) 47* jimbo2120 (IBM)
48* nornalbion
48* awebb (IBM) 49* awebb (IBM)
49* brianw/Sir_Ahzz 50* brianw/Sir_Ahzz
50* ChrisDown 51* ChrisDown
@@ -54,7 +55,7 @@ Patches
54* A_Biondi 55* A_Biondi
55* lulurun 56* lulurun
56* Melanie Thielker 57* Melanie Thielker
57* John R Sohn(XenReborn) 58* John R Sohn (XenReborn)
58* Xantor 59* Xantor
59* YZh 60* YZh
60* Grumly57 61* Grumly57
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