diff options
author | Sean Dague | 2008-04-24 12:27:24 +0000 |
---|---|---|
committer | Sean Dague | 2008-04-24 12:27:24 +0000 |
commit | 2a2ef42e64e202c81762adf0cc0e4cb1393f71ef (patch) | |
tree | 20768ffd9610712a51a4cc7f9f0ffbe667fbe2e2 /OpenSim/Region/Environment/Modules | |
parent | * Adds much better support for attachments that you right click on in world. (diff) | |
download | opensim-SC-2a2ef42e64e202c81762adf0cc0e4cb1393f71ef.zip opensim-SC-2a2ef42e64e202c81762adf0cc0e4cb1393f71ef.tar.gz opensim-SC-2a2ef42e64e202c81762adf0cc0e4cb1393f71ef.tar.bz2 opensim-SC-2a2ef42e64e202c81762adf0cc0e4cb1393f71ef.tar.xz |
replace hard tabs with 4 spaces to be consistant in the source.
Please adjust your editors to not use hard tabs.
Diffstat (limited to 'OpenSim/Region/Environment/Modules')
3 files changed, 278 insertions, 278 deletions
diff --git a/OpenSim/Region/Environment/Modules/BetaGridLikeMoneyModule.cs b/OpenSim/Region/Environment/Modules/BetaGridLikeMoneyModule.cs index bd0660f..34f8238 100644 --- a/OpenSim/Region/Environment/Modules/BetaGridLikeMoneyModule.cs +++ b/OpenSim/Region/Environment/Modules/BetaGridLikeMoneyModule.cs | |||
@@ -54,20 +54,20 @@ namespace OpenSim.Region.Environment.Modules | |||
54 | /// svn co https://opensimwiredux.svn.sourceforge.net/svnroot/opensimwiredux | 54 | /// svn co https://opensimwiredux.svn.sourceforge.net/svnroot/opensimwiredux |
55 | /// </summary> | 55 | /// </summary> |
56 | 56 | ||
57 | public delegate void ObjectPaid(LLUUID objectID, LLUUID agentID, int amount); | 57 | public delegate void ObjectPaid(LLUUID objectID, LLUUID agentID, int amount); |
58 | 58 | ||
59 | public interface IMoneyModule : IRegionModule | 59 | public interface IMoneyModule : IRegionModule |
60 | { | 60 | { |
61 | bool ObjectGiveMoney(LLUUID objectID, LLUUID fromID, LLUUID toID, int amount); | 61 | bool ObjectGiveMoney(LLUUID objectID, LLUUID fromID, LLUUID toID, int amount); |
62 | 62 | ||
63 | event ObjectPaid OnObjectPaid; | 63 | event ObjectPaid OnObjectPaid; |
64 | } | 64 | } |
65 | 65 | ||
66 | public class BetaGridLikeMoneyModule: IMoneyModule | 66 | public class BetaGridLikeMoneyModule: IMoneyModule |
67 | { | 67 | { |
68 | public event ObjectPaid OnObjectPaid; | 68 | public event ObjectPaid OnObjectPaid; |
69 | 69 | ||
70 | private ObjectPaid handerOnObjectPaid; | 70 | private ObjectPaid handerOnObjectPaid; |
71 | 71 | ||
72 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 72 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
73 | 73 | ||
@@ -134,7 +134,7 @@ namespace OpenSim.Region.Environment.Modules | |||
134 | IConfig startupConfig = m_gConfig.Configs["Startup"]; | 134 | IConfig startupConfig = m_gConfig.Configs["Startup"]; |
135 | IConfig economyConfig = m_gConfig.Configs["Economy"]; | 135 | IConfig economyConfig = m_gConfig.Configs["Economy"]; |
136 | 136 | ||
137 | scene.RegisterModuleInterface<IMoneyModule>(this); | 137 | scene.RegisterModuleInterface<IMoneyModule>(this); |
138 | 138 | ||
139 | ReadConfigAndPopulate(scene, startupConfig, "Startup"); | 139 | ReadConfigAndPopulate(scene, startupConfig, "Startup"); |
140 | ReadConfigAndPopulate(scene, economyConfig, "Economy"); | 140 | ReadConfigAndPopulate(scene, economyConfig, "Economy"); |
@@ -320,7 +320,7 @@ namespace OpenSim.Region.Environment.Modules | |||
320 | // Subscribe to Money messages | 320 | // Subscribe to Money messages |
321 | client.OnEconomyDataRequest += EconomyDataRequestHandler; | 321 | client.OnEconomyDataRequest += EconomyDataRequestHandler; |
322 | client.OnMoneyBalanceRequest += SendMoneyBalance; | 322 | client.OnMoneyBalanceRequest += SendMoneyBalance; |
323 | client.OnRequestPayPrice += requestPayPrice; | 323 | client.OnRequestPayPrice += requestPayPrice; |
324 | client.OnLogout += ClientClosed; | 324 | client.OnLogout += ClientClosed; |
325 | 325 | ||
326 | 326 | ||
@@ -328,20 +328,20 @@ namespace OpenSim.Region.Environment.Modules | |||
328 | 328 | ||
329 | #region event Handlers | 329 | #region event Handlers |
330 | 330 | ||
331 | public void requestPayPrice(IClientAPI client, LLUUID objectID) | 331 | public void requestPayPrice(IClientAPI client, LLUUID objectID) |
332 | { | 332 | { |
333 | Scene scene=LocateSceneClientIn(client.AgentId); | 333 | Scene scene=LocateSceneClientIn(client.AgentId); |
334 | if(scene == null) | 334 | if(scene == null) |
335 | return; | 335 | return; |
336 | 336 | ||
337 | SceneObjectPart task=scene.GetSceneObjectPart(objectID); | 337 | SceneObjectPart task=scene.GetSceneObjectPart(objectID); |
338 | if(task == null) | 338 | if(task == null) |
339 | return; | 339 | return; |
340 | SceneObjectGroup group=task.ParentGroup; | 340 | SceneObjectGroup group=task.ParentGroup; |
341 | SceneObjectPart root=group.RootPart; | 341 | SceneObjectPart root=group.RootPart; |
342 | 342 | ||
343 | client.SendPayPrice(objectID, root.PayPrice); | 343 | client.SendPayPrice(objectID, root.PayPrice); |
344 | } | 344 | } |
345 | 345 | ||
346 | /// <summary> | 346 | /// <summary> |
347 | /// When the client closes the connection we remove their accounting info from memory to free up resources. | 347 | /// When the client closes the connection we remove their accounting info from memory to free up resources. |
@@ -380,52 +380,52 @@ namespace OpenSim.Region.Environment.Modules | |||
380 | 380 | ||
381 | private void ValidateLandBuy (Object osender, EventManager.LandBuyArgs e) | 381 | private void ValidateLandBuy (Object osender, EventManager.LandBuyArgs e) |
382 | { | 382 | { |
383 | if (m_MoneyAddress.Length == 0) | 383 | if (m_MoneyAddress.Length == 0) |
384 | { | 384 | { |
385 | lock (m_KnownClientFunds) | 385 | lock (m_KnownClientFunds) |
386 | { | 386 | { |
387 | if (m_KnownClientFunds.ContainsKey(e.agentId)) | 387 | if (m_KnownClientFunds.ContainsKey(e.agentId)) |
388 | { | 388 | { |
389 | // Does the sender have enough funds to give? | 389 | // Does the sender have enough funds to give? |
390 | if (m_KnownClientFunds[e.agentId] >= e.parcelPrice) | 390 | if (m_KnownClientFunds[e.agentId] >= e.parcelPrice) |
391 | { | 391 | { |
392 | lock(e) | 392 | lock(e) |
393 | { | 393 | { |
394 | e.economyValidated=true; | 394 | e.economyValidated=true; |
395 | } | 395 | } |
396 | } | 396 | } |
397 | } | 397 | } |
398 | } | 398 | } |
399 | } | 399 | } |
400 | else | 400 | else |
401 | { | 401 | { |
402 | if(GetRemoteBalance(e.agentId) >= e.parcelPrice) | 402 | if(GetRemoteBalance(e.agentId) >= e.parcelPrice) |
403 | { | 403 | { |
404 | lock(e) | 404 | lock(e) |
405 | { | 405 | { |
406 | e.economyValidated=true; | 406 | e.economyValidated=true; |
407 | } | 407 | } |
408 | } | 408 | } |
409 | } | 409 | } |
410 | } | 410 | } |
411 | 411 | ||
412 | private void processLandBuy(Object osender, EventManager.LandBuyArgs e) | 412 | private void processLandBuy(Object osender, EventManager.LandBuyArgs e) |
413 | { | 413 | { |
414 | lock(e) | 414 | lock(e) |
415 | { | 415 | { |
416 | if(e.economyValidated == true && e.transactionID == 0) | 416 | if(e.economyValidated == true && e.transactionID == 0) |
417 | { | 417 | { |
418 | e.transactionID=Util.UnixTimeSinceEpoch(); | 418 | e.transactionID=Util.UnixTimeSinceEpoch(); |
419 | 419 | ||
420 | if(doMoneyTransfer(e.agentId, e.parcelOwnerID, e.parcelPrice, 0, "Land purchase")) | 420 | if(doMoneyTransfer(e.agentId, e.parcelOwnerID, e.parcelPrice, 0, "Land purchase")) |
421 | { | 421 | { |
422 | lock (e) | 422 | lock (e) |
423 | { | 423 | { |
424 | e.amountDebited = e.parcelPrice; | 424 | e.amountDebited = e.parcelPrice; |
425 | } | 425 | } |
426 | } | 426 | } |
427 | } | 427 | } |
428 | } | 428 | } |
429 | } | 429 | } |
430 | 430 | ||
431 | /// <summary> | 431 | /// <summary> |
@@ -438,47 +438,47 @@ namespace OpenSim.Region.Environment.Modules | |||
438 | IClientAPI sender = null; | 438 | IClientAPI sender = null; |
439 | IClientAPI receiver = null; | 439 | IClientAPI receiver = null; |
440 | 440 | ||
441 | if(m_MoneyAddress.Length > 0) // Handled on server | 441 | if(m_MoneyAddress.Length > 0) // Handled on server |
442 | e.description=String.Empty; | 442 | e.description=String.Empty; |
443 | 443 | ||
444 | if(e.transactiontype == 5008) // Object gets paid | 444 | if(e.transactiontype == 5008) // Object gets paid |
445 | { | 445 | { |
446 | sender = LocateClientObject(e.sender); | 446 | sender = LocateClientObject(e.sender); |
447 | if (sender != null) | 447 | if (sender != null) |
448 | { | 448 | { |
449 | SceneObjectPart part=findPrim(e.receiver); | 449 | SceneObjectPart part=findPrim(e.receiver); |
450 | if(part == null) | 450 | if(part == null) |
451 | return; | 451 | return; |
452 | 452 | ||
453 | string name=resolveAgentName(part.OwnerID); | 453 | string name=resolveAgentName(part.OwnerID); |
454 | if(name == String.Empty) | 454 | if(name == String.Empty) |
455 | name="(hippos)"; | 455 | name="(hippos)"; |
456 | 456 | ||
457 | receiver = LocateClientObject(part.OwnerID); | 457 | receiver = LocateClientObject(part.OwnerID); |
458 | 458 | ||
459 | string description=String.Format("Paid {0} via object {1}", name, e.description); | 459 | string description=String.Format("Paid {0} via object {1}", name, e.description); |
460 | bool transactionresult = doMoneyTransfer(e.sender, part.OwnerID, e.amount, e.transactiontype, description); | 460 | bool transactionresult = doMoneyTransfer(e.sender, part.OwnerID, e.amount, e.transactiontype, description); |
461 | 461 | ||
462 | if(transactionresult) | 462 | if(transactionresult) |
463 | { | 463 | { |
464 | ObjectPaid handlerOnObjectPaid = OnObjectPaid; | 464 | ObjectPaid handlerOnObjectPaid = OnObjectPaid; |
465 | if(handlerOnObjectPaid != null) | 465 | if(handlerOnObjectPaid != null) |
466 | { | 466 | { |
467 | handlerOnObjectPaid(e.receiver, e.sender, e.amount); | 467 | handlerOnObjectPaid(e.receiver, e.sender, e.amount); |
468 | } | 468 | } |
469 | } | 469 | } |
470 | 470 | ||
471 | if (e.sender != e.receiver) | 471 | if (e.sender != e.receiver) |
472 | { | 472 | { |
473 | sender.SendMoneyBalance(LLUUID.Random(), transactionresult, Helpers.StringToField(e.description), GetFundsForAgentID(e.sender)); | 473 | sender.SendMoneyBalance(LLUUID.Random(), transactionresult, Helpers.StringToField(e.description), GetFundsForAgentID(e.sender)); |
474 | } | 474 | } |
475 | if(receiver != null) | 475 | if(receiver != null) |
476 | { | 476 | { |
477 | receiver.SendMoneyBalance(LLUUID.Random(), transactionresult, Helpers.StringToField(e.description), GetFundsForAgentID(part.OwnerID)); | 477 | receiver.SendMoneyBalance(LLUUID.Random(), transactionresult, Helpers.StringToField(e.description), GetFundsForAgentID(part.OwnerID)); |
478 | } | 478 | } |
479 | } | 479 | } |
480 | return; | 480 | return; |
481 | } | 481 | } |
482 | 482 | ||
483 | sender = LocateClientObject(e.sender); | 483 | sender = LocateClientObject(e.sender); |
484 | if (sender != null) | 484 | if (sender != null) |
@@ -652,45 +652,45 @@ namespace OpenSim.Region.Environment.Modules | |||
652 | { | 652 | { |
653 | // If we don't know about the sender, then the sender can't | 653 | // If we don't know about the sender, then the sender can't |
654 | // actually be here and therefore this is likely fraud or outdated. | 654 | // actually be here and therefore this is likely fraud or outdated. |
655 | if (m_MoneyAddress.Length == 0) | 655 | if (m_MoneyAddress.Length == 0) |
656 | { | 656 | { |
657 | if (m_KnownClientFunds.ContainsKey(Sender)) | 657 | if (m_KnownClientFunds.ContainsKey(Sender)) |
658 | { | 658 | { |
659 | // Does the sender have enough funds to give? | 659 | // Does the sender have enough funds to give? |
660 | if (m_KnownClientFunds[Sender] >= amount) | 660 | if (m_KnownClientFunds[Sender] >= amount) |
661 | { | 661 | { |
662 | // Subtract the funds from the senders account | 662 | // Subtract the funds from the senders account |
663 | m_KnownClientFunds[Sender] -= amount; | 663 | m_KnownClientFunds[Sender] -= amount; |
664 | 664 | ||
665 | // do we know about the receiver? | 665 | // do we know about the receiver? |
666 | if (!m_KnownClientFunds.ContainsKey(Receiver)) | 666 | if (!m_KnownClientFunds.ContainsKey(Receiver)) |
667 | { | 667 | { |
668 | // Make a record for them so they get the updated balance when they login | 668 | // Make a record for them so they get the updated balance when they login |
669 | CheckExistAndRefreshFunds(Receiver); | 669 | CheckExistAndRefreshFunds(Receiver); |
670 | } | 670 | } |
671 | if (m_enabled) | 671 | if (m_enabled) |
672 | { | 672 | { |
673 | //Add the amount to the Receiver's funds | 673 | //Add the amount to the Receiver's funds |
674 | m_KnownClientFunds[Receiver] += amount; | 674 | m_KnownClientFunds[Receiver] += amount; |
675 | result = true; | 675 | result = true; |
676 | } | 676 | } |
677 | } | 677 | } |
678 | else | 678 | else |
679 | { | 679 | { |
680 | // These below are redundant to make this clearer to read | 680 | // These below are redundant to make this clearer to read |
681 | result = false; | 681 | result = false; |
682 | } | 682 | } |
683 | } | 683 | } |
684 | else | 684 | else |
685 | { | 685 | { |
686 | result = false; | 686 | result = false; |
687 | } | 687 | } |
688 | } | 688 | } |
689 | else | 689 | else |
690 | { | 690 | { |
691 | result = TransferMoneyonMoneyServer(Sender, Receiver, amount, transactiontype, description); | 691 | result = TransferMoneyonMoneyServer(Sender, Receiver, amount, transactiontype, description); |
692 | } | 692 | } |
693 | } | 693 | } |
694 | } | 694 | } |
695 | return result; | 695 | return result; |
696 | } | 696 | } |
@@ -1003,50 +1003,50 @@ namespace OpenSim.Region.Environment.Modules | |||
1003 | return MoneyRespData; | 1003 | return MoneyRespData; |
1004 | } | 1004 | } |
1005 | 1005 | ||
1006 | private SceneObjectPart findPrim(LLUUID objectID) | 1006 | private SceneObjectPart findPrim(LLUUID objectID) |
1007 | { | 1007 | { |
1008 | lock (m_scenel) | 1008 | lock (m_scenel) |
1009 | { | 1009 | { |
1010 | foreach (Scene s in m_scenel.Values) | 1010 | foreach (Scene s in m_scenel.Values) |
1011 | { | 1011 | { |
1012 | SceneObjectPart part=s.GetSceneObjectPart(objectID); | 1012 | SceneObjectPart part=s.GetSceneObjectPart(objectID); |
1013 | if(part != null) | 1013 | if(part != null) |
1014 | { | 1014 | { |
1015 | return part; | 1015 | return part; |
1016 | } | 1016 | } |
1017 | } | 1017 | } |
1018 | } | ||
1019 | return null; | ||
1020 | } | ||
1021 | |||
1022 | private string resolveObjectName(LLUUID objectID) | ||
1023 | { | ||
1024 | SceneObjectPart part=findPrim(objectID); | ||
1025 | if(part != null) | ||
1026 | { | ||
1027 | return part.Name; | ||
1018 | } | 1028 | } |
1019 | return null; | 1029 | return String.Empty; |
1020 | } | 1030 | } |
1021 | 1031 | ||
1022 | private string resolveObjectName(LLUUID objectID) | 1032 | private string resolveAgentName(LLUUID agentID) |
1023 | { | ||
1024 | SceneObjectPart part=findPrim(objectID); | ||
1025 | if(part != null) | ||
1026 | { | ||
1027 | return part.Name; | ||
1028 | } | ||
1029 | return String.Empty; | ||
1030 | } | ||
1031 | |||
1032 | private string resolveAgentName(LLUUID agentID) | ||
1033 | { | 1033 | { |
1034 | // try avatar username surname | 1034 | // try avatar username surname |
1035 | Scene scene=GetRandomScene(); | 1035 | Scene scene=GetRandomScene(); |
1036 | UserProfileData profile = scene.CommsManager.UserService.GetUserProfile(agentID); | 1036 | UserProfileData profile = scene.CommsManager.UserService.GetUserProfile(agentID); |
1037 | if (profile != null) | 1037 | if (profile != null) |
1038 | { | 1038 | { |
1039 | string avatarname = profile.FirstName + " " + profile.SurName; | 1039 | string avatarname = profile.FirstName + " " + profile.SurName; |
1040 | return avatarname; | 1040 | return avatarname; |
1041 | } | 1041 | } |
1042 | return String.Empty; | 1042 | return String.Empty; |
1043 | } | 1043 | } |
1044 | 1044 | ||
1045 | public bool ObjectGiveMoney(LLUUID objectID, LLUUID fromID, LLUUID toID, int amount) | 1045 | public bool ObjectGiveMoney(LLUUID objectID, LLUUID fromID, LLUUID toID, int amount) |
1046 | { | 1046 | { |
1047 | string description=String.Format("Object {0} pays {1}", resolveObjectName(objectID), resolveAgentName(toID)); | 1047 | string description=String.Format("Object {0} pays {1}", resolveObjectName(objectID), resolveAgentName(toID)); |
1048 | return doMoneyTransfer(fromID, toID, amount, 2, description); | 1048 | return doMoneyTransfer(fromID, toID, amount, 2, description); |
1049 | } | 1049 | } |
1050 | 1050 | ||
1051 | /// <summary> | 1051 | /// <summary> |
1052 | /// Informs the Money Grid Server of a transfer. | 1052 | /// Informs the Money Grid Server of a transfer. |
@@ -1134,63 +1134,63 @@ namespace OpenSim.Region.Environment.Modules | |||
1134 | 1134 | ||
1135 | } | 1135 | } |
1136 | 1136 | ||
1137 | public int GetRemoteBalance(LLUUID agentId) | 1137 | public int GetRemoteBalance(LLUUID agentId) |
1138 | { | 1138 | { |
1139 | int funds = 0; | 1139 | int funds = 0; |
1140 | 1140 | ||
1141 | IClientAPI aClient = LocateClientObject(agentId); | 1141 | IClientAPI aClient = LocateClientObject(agentId); |
1142 | if (aClient != null) | 1142 | if (aClient != null) |
1143 | { | 1143 | { |
1144 | Scene s = LocateSceneClientIn(agentId); | 1144 | Scene s = LocateSceneClientIn(agentId); |
1145 | if (s != null) | 1145 | if (s != null) |
1146 | { | 1146 | { |
1147 | if (m_MoneyAddress.Length > 0) | 1147 | if (m_MoneyAddress.Length > 0) |
1148 | { | 1148 | { |
1149 | Hashtable hbinfo = GetBalanceForUserFromMoneyServer(aClient.AgentId, aClient.SecureSessionId, s.RegionInfo.originRegionID.ToString(), s.RegionInfo.regionSecret); | 1149 | Hashtable hbinfo = GetBalanceForUserFromMoneyServer(aClient.AgentId, aClient.SecureSessionId, s.RegionInfo.originRegionID.ToString(), s.RegionInfo.regionSecret); |
1150 | if ((bool)hbinfo["success"] == true) | 1150 | if ((bool)hbinfo["success"] == true) |
1151 | { | 1151 | { |
1152 | try | 1152 | try |
1153 | { | 1153 | { |
1154 | funds = (Int32)hbinfo["funds"]; | 1154 | funds = (Int32)hbinfo["funds"]; |
1155 | } | 1155 | } |
1156 | catch (ArgumentException) | 1156 | catch (ArgumentException) |
1157 | { | 1157 | { |
1158 | } | 1158 | } |
1159 | catch (FormatException) | 1159 | catch (FormatException) |
1160 | { | 1160 | { |
1161 | } | 1161 | } |
1162 | catch (OverflowException) | 1162 | catch (OverflowException) |
1163 | { | 1163 | { |
1164 | m_log.ErrorFormat("[MONEY]: While getting the Currency for user {0}, the return funds overflowed.", agentId); | 1164 | m_log.ErrorFormat("[MONEY]: While getting the Currency for user {0}, the return funds overflowed.", agentId); |
1165 | aClient.SendAlertMessage("Unable to get your money balance, money operations will be unavailable"); | 1165 | aClient.SendAlertMessage("Unable to get your money balance, money operations will be unavailable"); |
1166 | } | 1166 | } |
1167 | catch (InvalidCastException) | 1167 | catch (InvalidCastException) |
1168 | { | 1168 | { |
1169 | funds = 0; | 1169 | funds = 0; |
1170 | } | 1170 | } |
1171 | 1171 | ||
1172 | } | 1172 | } |
1173 | else | 1173 | else |
1174 | { | 1174 | { |
1175 | m_log.WarnFormat("[MONEY]: Getting Money for user {0} failed with the following message:{1}", agentId, (string)hbinfo["errorMessage"]); | 1175 | m_log.WarnFormat("[MONEY]: Getting Money for user {0} failed with the following message:{1}", agentId, (string)hbinfo["errorMessage"]); |
1176 | aClient.SendAlertMessage((string)hbinfo["errorMessage"]); | 1176 | aClient.SendAlertMessage((string)hbinfo["errorMessage"]); |
1177 | } | 1177 | } |
1178 | } | 1178 | } |
1179 | 1179 | ||
1180 | SetLocalFundsForAgentID(agentId, funds); | 1180 | SetLocalFundsForAgentID(agentId, funds); |
1181 | SendMoneyBalance(aClient, agentId, aClient.SessionId, LLUUID.Zero); | 1181 | SendMoneyBalance(aClient, agentId, aClient.SessionId, LLUUID.Zero); |
1182 | } | 1182 | } |
1183 | else | 1183 | else |
1184 | { | 1184 | { |
1185 | m_log.Debug("[MONEY]: Got balance request update for agent that is here, but couldn't find which scene."); | 1185 | m_log.Debug("[MONEY]: Got balance request update for agent that is here, but couldn't find which scene."); |
1186 | } | 1186 | } |
1187 | } | 1187 | } |
1188 | else | 1188 | else |
1189 | { | 1189 | { |
1190 | m_log.Debug("[MONEY]: Got balance request update for agent that isn't here."); | 1190 | m_log.Debug("[MONEY]: Got balance request update for agent that isn't here."); |
1191 | } | 1191 | } |
1192 | return funds; | 1192 | return funds; |
1193 | } | 1193 | } |
1194 | 1194 | ||
1195 | public XmlRpcResponse GridMoneyUpdate(XmlRpcRequest request) | 1195 | public XmlRpcResponse GridMoneyUpdate(XmlRpcRequest request) |
1196 | { | 1196 | { |
@@ -1204,7 +1204,7 @@ namespace OpenSim.Region.Environment.Modules | |||
1204 | Helpers.TryParse((string)requestData["agentId"], out agentId); | 1204 | Helpers.TryParse((string)requestData["agentId"], out agentId); |
1205 | if (agentId != LLUUID.Zero) | 1205 | if (agentId != LLUUID.Zero) |
1206 | { | 1206 | { |
1207 | GetRemoteBalance(agentId); | 1207 | GetRemoteBalance(agentId); |
1208 | 1208 | ||
1209 | } | 1209 | } |
1210 | else | 1210 | else |
@@ -1228,7 +1228,7 @@ namespace OpenSim.Region.Environment.Modules | |||
1228 | /// XMLRPC handler to send alert message and sound to client | 1228 | /// XMLRPC handler to send alert message and sound to client |
1229 | /// </summary> | 1229 | /// </summary> |
1230 | public XmlRpcResponse UserAlert(XmlRpcRequest request) | 1230 | public XmlRpcResponse UserAlert(XmlRpcRequest request) |
1231 | { | 1231 | { |
1232 | XmlRpcResponse ret = new XmlRpcResponse(); | 1232 | XmlRpcResponse ret = new XmlRpcResponse(); |
1233 | Hashtable retparam = new Hashtable(); | 1233 | Hashtable retparam = new Hashtable(); |
1234 | Hashtable requestData = (Hashtable)request.Params[0]; | 1234 | Hashtable requestData = (Hashtable)request.Params[0]; |
@@ -1236,36 +1236,36 @@ namespace OpenSim.Region.Environment.Modules | |||
1236 | LLUUID agentId = LLUUID.Zero; | 1236 | LLUUID agentId = LLUUID.Zero; |
1237 | LLUUID soundId = LLUUID.Zero; | 1237 | LLUUID soundId = LLUUID.Zero; |
1238 | 1238 | ||
1239 | Helpers.TryParse((string)requestData["agentId"], out agentId); | 1239 | Helpers.TryParse((string)requestData["agentId"], out agentId); |
1240 | Helpers.TryParse((string)requestData["soundId"], out soundId); | 1240 | Helpers.TryParse((string)requestData["soundId"], out soundId); |
1241 | string text=(string)requestData["text"]; | 1241 | string text=(string)requestData["text"]; |
1242 | string secret=(string)requestData["secret"]; | 1242 | string secret=(string)requestData["secret"]; |
1243 | 1243 | ||
1244 | Scene userScene = GetRandomScene(); | 1244 | Scene userScene = GetRandomScene(); |
1245 | if(userScene.RegionInfo.regionSecret.ToString() == secret) | 1245 | if(userScene.RegionInfo.regionSecret.ToString() == secret) |
1246 | { | 1246 | { |
1247 | IClientAPI client = LocateClientObject(agentId); | 1247 | IClientAPI client = LocateClientObject(agentId); |
1248 | 1248 | ||
1249 | if (client != null) | 1249 | if (client != null) |
1250 | { | 1250 | { |
1251 | if(soundId != LLUUID.Zero) | 1251 | if(soundId != LLUUID.Zero) |
1252 | client.SendPlayAttachedSound(soundId, LLUUID.Zero, LLUUID.Zero, 1.0f, 0); | 1252 | client.SendPlayAttachedSound(soundId, LLUUID.Zero, LLUUID.Zero, 1.0f, 0); |
1253 | client.SendBlueBoxMessage(LLUUID.Zero, LLUUID.Zero, "", text); | 1253 | client.SendBlueBoxMessage(LLUUID.Zero, LLUUID.Zero, "", text); |
1254 | retparam.Add("success", true); | 1254 | retparam.Add("success", true); |
1255 | } | 1255 | } |
1256 | else | 1256 | else |
1257 | { | 1257 | { |
1258 | retparam.Add("success", false); | 1258 | retparam.Add("success", false); |
1259 | } | 1259 | } |
1260 | } | 1260 | } |
1261 | else | 1261 | else |
1262 | { | 1262 | { |
1263 | retparam.Add("success", false); | 1263 | retparam.Add("success", false); |
1264 | } | 1264 | } |
1265 | ret.Value = retparam; | 1265 | ret.Value = retparam; |
1266 | 1266 | ||
1267 | return ret; | 1267 | return ret; |
1268 | } | 1268 | } |
1269 | 1269 | ||
1270 | 1270 | ||
1271 | # region Standalone box enablers only | 1271 | # region Standalone box enablers only |
diff --git a/OpenSim/Region/Environment/Modules/LandManagement/LandChannel.cs b/OpenSim/Region/Environment/Modules/LandManagement/LandChannel.cs index 561c5cf..e2414b0 100644 --- a/OpenSim/Region/Environment/Modules/LandManagement/LandChannel.cs +++ b/OpenSim/Region/Environment/Modules/LandManagement/LandChannel.cs | |||
@@ -949,12 +949,12 @@ namespace OpenSim.Region.Environment.Modules.LandManagement | |||
949 | } | 949 | } |
950 | } | 950 | } |
951 | 951 | ||
952 | // If the economy has been validated by the economy module, | 952 | // If the economy has been validated by the economy module, |
953 | // and land has been validated as well, this method transfers | 953 | // and land has been validated as well, this method transfers |
954 | // the land ownership | 954 | // the land ownership |
955 | 955 | ||
956 | public void handleLandBuyRequest(Object o, EventManager.LandBuyArgs e) | 956 | public void handleLandBuyRequest(Object o, EventManager.LandBuyArgs e) |
957 | { | 957 | { |
958 | if (e.economyValidated && e.landValidated) | 958 | if (e.economyValidated && e.landValidated) |
959 | { | 959 | { |
960 | lock (landList) | 960 | lock (landList) |
@@ -966,11 +966,11 @@ namespace OpenSim.Region.Environment.Modules.LandManagement | |||
966 | } | 966 | } |
967 | } | 967 | } |
968 | } | 968 | } |
969 | } | 969 | } |
970 | 970 | ||
971 | // After receiving a land buy packet, first the data needs to | 971 | // After receiving a land buy packet, first the data needs to |
972 | // be validated. This method validates the right to buy the | 972 | // be validated. This method validates the right to buy the |
973 | // parcel | 973 | // parcel |
974 | 974 | ||
975 | public void handleLandValidationRequest(Object o, EventManager.LandBuyArgs e) | 975 | public void handleLandValidationRequest(Object o, EventManager.LandBuyArgs e) |
976 | { | 976 | { |
diff --git a/OpenSim/Region/Environment/Modules/LandManagement/LandObject.cs b/OpenSim/Region/Environment/Modules/LandManagement/LandObject.cs index f9684e6..6e87a1c 100644 --- a/OpenSim/Region/Environment/Modules/LandManagement/LandObject.cs +++ b/OpenSim/Region/Environment/Modules/LandManagement/LandObject.cs | |||
@@ -73,20 +73,20 @@ namespace OpenSim.Region.Environment.Modules.LandManagement | |||
73 | 73 | ||
74 | public LandData landData | 74 | public LandData landData |
75 | { | 75 | { |
76 | get | 76 | get |
77 | { | 77 | { |
78 | return m_landData; | 78 | return m_landData; |
79 | } | 79 | } |
80 | 80 | ||
81 | set | 81 | set |
82 | { | 82 | { |
83 | m_landData = value; | 83 | m_landData = value; |
84 | } | 84 | } |
85 | } | 85 | } |
86 | 86 | ||
87 | public LLUUID regionUUID | 87 | public LLUUID regionUUID |
88 | { | 88 | { |
89 | get { return m_scene.RegionInfo.RegionID; } | 89 | get { return m_scene.RegionInfo.RegionID; } |
90 | } | 90 | } |
91 | 91 | ||
92 | #endregion | 92 | #endregion |