aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/OptionalModules
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/OptionalModules')
-rw-r--r--OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs27
-rw-r--r--OpenSim/Region/OptionalModules/Avatar/Attachments/TempAttachmentsModule.cs2
-rw-r--r--OpenSim/Region/OptionalModules/Avatar/Friends/FriendsCommandsModule.cs4
-rw-r--r--OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchVoiceModule.cs4
-rw-r--r--OpenSim/Region/OptionalModules/Avatar/Voice/VivoxVoice/VivoxVoiceModule.cs55
-rw-r--r--OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs2
-rw-r--r--OpenSim/Region/OptionalModules/PrimLimitsModule/PrimLimitsModule.cs38
-rw-r--r--OpenSim/Region/OptionalModules/Scripting/XmlRpcRouterModule/XmlRpcRouterModule.cs5
-rw-r--r--OpenSim/Region/OptionalModules/ViewerSupport/DynamicFloaterModule.cs238
-rw-r--r--OpenSim/Region/OptionalModules/ViewerSupport/DynamicMenuModule.cs38
-rw-r--r--OpenSim/Region/OptionalModules/World/MoneyModule/SampleMoneyModule.cs6
-rw-r--r--OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs28
-rw-r--r--OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs75
-rw-r--r--OpenSim/Region/OptionalModules/World/NPC/Tests/NPCModuleTests.cs2
14 files changed, 397 insertions, 127 deletions
diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs
index 3726191..b28d96b 100644
--- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs
+++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs
@@ -671,6 +671,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server
671 public event ObjectDrop OnObjectDrop; 671 public event ObjectDrop OnObjectDrop;
672 public event StartAnim OnStartAnim; 672 public event StartAnim OnStartAnim;
673 public event StopAnim OnStopAnim; 673 public event StopAnim OnStopAnim;
674 public event ChangeAnim OnChangeAnim;
674 public event LinkObjects OnLinkObjects; 675 public event LinkObjects OnLinkObjects;
675 public event DelinkObjects OnDelinkObjects; 676 public event DelinkObjects OnDelinkObjects;
676 public event RequestMapBlocks OnRequestMapBlocks; 677 public event RequestMapBlocks OnRequestMapBlocks;
@@ -716,6 +717,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server
716 public event RequestObjectPropertiesFamily OnRequestObjectPropertiesFamily; 717 public event RequestObjectPropertiesFamily OnRequestObjectPropertiesFamily;
717 public event UpdatePrimFlags OnUpdatePrimFlags; 718 public event UpdatePrimFlags OnUpdatePrimFlags;
718 public event UpdatePrimTexture OnUpdatePrimTexture; 719 public event UpdatePrimTexture OnUpdatePrimTexture;
720 public event ClientChangeObject onClientChangeObject;
719 public event UpdateVector OnUpdatePrimGroupPosition; 721 public event UpdateVector OnUpdatePrimGroupPosition;
720 public event UpdateVector OnUpdatePrimSinglePosition; 722 public event UpdateVector OnUpdatePrimSinglePosition;
721 public event UpdatePrimRotation OnUpdatePrimGroupRotation; 723 public event UpdatePrimRotation OnUpdatePrimGroupRotation;
@@ -820,6 +822,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server
820 public event ObjectOwner OnObjectOwner; 822 public event ObjectOwner OnObjectOwner;
821 public event DirPlacesQuery OnDirPlacesQuery; 823 public event DirPlacesQuery OnDirPlacesQuery;
822 public event DirFindQuery OnDirFindQuery; 824 public event DirFindQuery OnDirFindQuery;
825 public event MoveItemsAndLeaveCopy OnMoveItemsAndLeaveCopy;
823 public event DirLandQuery OnDirLandQuery; 826 public event DirLandQuery OnDirLandQuery;
824 public event DirPopularQuery OnDirPopularQuery; 827 public event DirPopularQuery OnDirPopularQuery;
825 public event DirClassifiedQuery OnDirClassifiedQuery; 828 public event DirClassifiedQuery OnDirClassifiedQuery;
@@ -836,7 +839,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server
836 public event ClassifiedInfoRequest OnClassifiedInfoRequest; 839 public event ClassifiedInfoRequest OnClassifiedInfoRequest;
837 public event ClassifiedInfoUpdate OnClassifiedInfoUpdate; 840 public event ClassifiedInfoUpdate OnClassifiedInfoUpdate;
838 public event ClassifiedDelete OnClassifiedDelete; 841 public event ClassifiedDelete OnClassifiedDelete;
839 public event ClassifiedDelete OnClassifiedGodDelete; 842 public event ClassifiedGodDelete OnClassifiedGodDelete;
840 public event EventNotificationAddRequest OnEventNotificationAddRequest; 843 public event EventNotificationAddRequest OnEventNotificationAddRequest;
841 public event EventNotificationRemoveRequest OnEventNotificationRemoveRequest; 844 public event EventNotificationRemoveRequest OnEventNotificationRemoveRequest;
842 public event EventGodDelete OnEventGodDelete; 845 public event EventGodDelete OnEventGodDelete;
@@ -866,10 +869,12 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server
866 public event GroupVoteHistoryRequest OnGroupVoteHistoryRequest; 869 public event GroupVoteHistoryRequest OnGroupVoteHistoryRequest;
867 public event SimWideDeletesDelegate OnSimWideDeletes; 870 public event SimWideDeletesDelegate OnSimWideDeletes;
868 public event SendPostcard OnSendPostcard; 871 public event SendPostcard OnSendPostcard;
872 public event ChangeInventoryItemFlags OnChangeInventoryItemFlags;
869 public event MuteListEntryUpdate OnUpdateMuteListEntry; 873 public event MuteListEntryUpdate OnUpdateMuteListEntry;
870 public event MuteListEntryRemove OnRemoveMuteListEntry; 874 public event MuteListEntryRemove OnRemoveMuteListEntry;
871 public event GodlikeMessage onGodlikeMessage; 875 public event GodlikeMessage onGodlikeMessage;
872 public event GodUpdateRegionInfoUpdate OnGodUpdateRegionInfoUpdate; 876 public event GodUpdateRegionInfoUpdate OnGodUpdateRegionInfoUpdate;
877 public event GenericCall2 OnUpdateThrottles;
873 878
874#pragma warning restore 67 879#pragma warning restore 67
875 880
@@ -887,10 +892,10 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server
887 892
888 public void Close() 893 public void Close()
889 { 894 {
890 Close(false); 895 Close(true, false);
891 } 896 }
892 897
893 public void Close(bool force) 898 public void Close(bool sendStop, bool force)
894 { 899 {
895 Disconnect(); 900 Disconnect();
896 } 901 }
@@ -907,7 +912,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server
907 // Mimicking LLClientView which gets always set appearance from client. 912 // Mimicking LLClientView which gets always set appearance from client.
908 AvatarAppearance appearance; 913 AvatarAppearance appearance;
909 m_scene.GetAvatarAppearance(this, out appearance); 914 m_scene.GetAvatarAppearance(this, out appearance);
910 OnSetAppearance(this, appearance.Texture, (byte[])appearance.VisualParams.Clone(), new List<CachedTextureRequestArg>()); 915 OnSetAppearance(this, appearance.Texture, (byte[])appearance.VisualParams.Clone(),appearance.AvatarSize, new WearableCacheItem[0]);
911 } 916 }
912 917
913 public void SendRegionHandshake(RegionInfo regionInfo, RegionHandshakeArgs args) 918 public void SendRegionHandshake(RegionInfo regionInfo, RegionHandshakeArgs args)
@@ -1103,7 +1108,12 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server
1103 1108
1104 public void SendInventoryItemCreateUpdate(InventoryItemBase Item, uint callbackId) 1109 public void SendInventoryItemCreateUpdate(InventoryItemBase Item, uint callbackId)
1105 { 1110 {
1106 1111
1112 }
1113
1114 public void SendInventoryItemCreateUpdate(InventoryItemBase Item, UUID transactionID, uint callbackId)
1115 {
1116
1107 } 1117 }
1108 1118
1109 public void SendRemoveInventoryItem(UUID itemID) 1119 public void SendRemoveInventoryItem(UUID itemID)
@@ -1126,7 +1136,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server
1126 1136
1127 } 1137 }
1128 1138
1129 public void SendXferPacket(ulong xferID, uint packet, byte[] data) 1139 public void SendXferPacket(ulong xferID, uint packet, byte[] data, bool isTaskInventory)
1130 { 1140 {
1131 1141
1132 } 1142 }
@@ -1420,6 +1430,11 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server
1420 1430
1421 } 1431 }
1422 1432
1433 public void SetAgentThrottleSilent(int throttle, int setting)
1434 {
1435
1436
1437 }
1423 public byte[] GetThrottlesPacked(float multiplier) 1438 public byte[] GetThrottlesPacked(float multiplier)
1424 { 1439 {
1425 return new byte[0]; 1440 return new byte[0];
diff --git a/OpenSim/Region/OptionalModules/Avatar/Attachments/TempAttachmentsModule.cs b/OpenSim/Region/OptionalModules/Avatar/Attachments/TempAttachmentsModule.cs
index 535bf67..d56e39d 100644
--- a/OpenSim/Region/OptionalModules/Avatar/Attachments/TempAttachmentsModule.cs
+++ b/OpenSim/Region/OptionalModules/Avatar/Attachments/TempAttachmentsModule.cs
@@ -184,7 +184,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Attachments
184 hostPart.ParentGroup.RootPart.ScheduleFullUpdate(); 184 hostPart.ParentGroup.RootPart.ScheduleFullUpdate();
185 } 185 }
186 186
187 return attachmentsModule.AttachObject(target, hostPart.ParentGroup, (uint)attachmentPoint, false, false, true) ? 1 : 0; 187 return attachmentsModule.AttachObject(target, hostPart.ParentGroup, (uint)attachmentPoint, false, false, true, true) ? 1 : 0;
188 } 188 }
189 } 189 }
190} 190}
diff --git a/OpenSim/Region/OptionalModules/Avatar/Friends/FriendsCommandsModule.cs b/OpenSim/Region/OptionalModules/Avatar/Friends/FriendsCommandsModule.cs
index 4e84364..026ceca 100644
--- a/OpenSim/Region/OptionalModules/Avatar/Friends/FriendsCommandsModule.cs
+++ b/OpenSim/Region/OptionalModules/Avatar/Friends/FriendsCommandsModule.cs
@@ -107,7 +107,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Friends
107 m_scene.AddCommand( 107 m_scene.AddCommand(
108 "Friends", this, "friends show", 108 "Friends", this, "friends show",
109 "friends show [--cache] <first-name> <last-name>", 109 "friends show [--cache] <first-name> <last-name>",
110 "Show the friends for the given user if they exist.\n", 110 "Show the friends for the given user if they exist.",
111 "The --cache option will show locally cached information for that user.", 111 "The --cache option will show locally cached information for that user.",
112 HandleFriendsShowCommand); 112 HandleFriendsShowCommand);
113 } 113 }
@@ -197,4 +197,4 @@ namespace OpenSim.Region.OptionalModules.Avatar.Friends
197 } 197 }
198 } 198 }
199 } 199 }
200} \ No newline at end of file 200}
diff --git a/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchVoiceModule.cs b/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchVoiceModule.cs
index ef1b92e..0cec959 100644
--- a/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchVoiceModule.cs
+++ b/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchVoiceModule.cs
@@ -575,7 +575,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice
575 575
576 public Hashtable FreeSwitchSLVoiceGetPreloginHTTPHandler(Hashtable request) 576 public Hashtable FreeSwitchSLVoiceGetPreloginHTTPHandler(Hashtable request)
577 { 577 {
578 m_log.Debug("[FreeSwitchVoice]: FreeSwitchSLVoiceGetPreloginHTTPHandler called"); 578// m_log.Debug("[FreeSwitchVoice] FreeSwitchSLVoiceGetPreloginHTTPHandler called");
579 579
580 Hashtable response = new Hashtable(); 580 Hashtable response = new Hashtable();
581 response["content_type"] = "text/xml"; 581 response["content_type"] = "text/xml";
@@ -726,7 +726,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice
726 726
727 public Hashtable FreeSwitchSLVoiceSigninHTTPHandler(Hashtable request) 727 public Hashtable FreeSwitchSLVoiceSigninHTTPHandler(Hashtable request)
728 { 728 {
729 m_log.Debug("[FreeSwitchVoice]: FreeSwitchSLVoiceSigninHTTPHandler called"); 729 //m_log.Debug("[FreeSwitchVoice] FreeSwitchSLVoiceSigninHTTPHandler called");
730// string requestbody = (string)request["body"]; 730// string requestbody = (string)request["body"];
731// string uri = (string)request["uri"]; 731// string uri = (string)request["uri"];
732// string contenttype = (string)request["content-type"]; 732// string contenttype = (string)request["content-type"];
diff --git a/OpenSim/Region/OptionalModules/Avatar/Voice/VivoxVoice/VivoxVoiceModule.cs b/OpenSim/Region/OptionalModules/Avatar/Voice/VivoxVoice/VivoxVoiceModule.cs
index 2d65530..2f07c42 100644
--- a/OpenSim/Region/OptionalModules/Avatar/Voice/VivoxVoice/VivoxVoiceModule.cs
+++ b/OpenSim/Region/OptionalModules/Avatar/Voice/VivoxVoice/VivoxVoiceModule.cs
@@ -196,7 +196,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
196 break; 196 break;
197 } 197 }
198 198
199 m_vivoxVoiceAccountApi = String.Format("http://{0}/api2", m_vivoxServer); 199 m_vivoxVoiceAccountApi = String.Format("https://{0}/api2", m_vivoxServer);
200 200
201 // Admin interface required values 201 // Admin interface required values
202 if (String.IsNullOrEmpty(m_vivoxServer) || 202 if (String.IsNullOrEmpty(m_vivoxServer) ||
@@ -475,8 +475,8 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
475 avatarName = avatar.Name; 475 avatarName = avatar.Name;
476 476
477 m_log.DebugFormat("[VivoxVoice][PROVISIONVOICE]: scene = {0}, agentID = {1}", scene, agentID); 477 m_log.DebugFormat("[VivoxVoice][PROVISIONVOICE]: scene = {0}, agentID = {1}", scene, agentID);
478 m_log.DebugFormat("[VivoxVoice][PROVISIONVOICE]: request: {0}, path: {1}, param: {2}", 478// m_log.DebugFormat("[VivoxVoice][PROVISIONVOICE]: request: {0}, path: {1}, param: {2}",
479 request, path, param); 479// request, path, param);
480 480
481 XmlElement resp; 481 XmlElement resp;
482 bool retry = false; 482 bool retry = false;
@@ -583,7 +583,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
583 583
584 string r = LLSDHelpers.SerialiseLLSDReply(voiceAccountResponse); 584 string r = LLSDHelpers.SerialiseLLSDReply(voiceAccountResponse);
585 585
586 m_log.DebugFormat("[VivoxVoice][PROVISIONVOICE]: avatar \"{0}\": {1}", avatarName, r); 586// m_log.DebugFormat("[VivoxVoice][PROVISIONVOICE]: avatar \"{0}\": {1}", avatarName, r);
587 587
588 return r; 588 return r;
589 } 589 }
@@ -631,8 +631,8 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
631 // voice channel 631 // voice channel
632 LandData land = scene.GetLandData(avatar.AbsolutePosition); 632 LandData land = scene.GetLandData(avatar.AbsolutePosition);
633 633
634 m_log.DebugFormat("[VivoxVoice][PARCELVOICE]: region \"{0}\": Parcel \"{1}\" ({2}): avatar \"{3}\": request: {4}, path: {5}, param: {6}", 634// m_log.DebugFormat("[VivoxVoice][PARCELVOICE]: region \"{0}\": Parcel \"{1}\" ({2}): avatar \"{3}\": request: {4}, path: {5}, param: {6}",
635 scene.RegionInfo.RegionName, land.Name, land.LocalID, avatarName, request, path, param); 635// scene.RegionInfo.RegionName, land.Name, land.LocalID, avatarName, request, path, param);
636 // m_log.DebugFormat("[VivoxVoice][PARCELVOICE]: avatar \"{0}\": location: {1} {2} {3}", 636 // m_log.DebugFormat("[VivoxVoice][PARCELVOICE]: avatar \"{0}\": location: {1} {2} {3}",
637 // avatarName, avatar.AbsolutePosition.X, avatar.AbsolutePosition.Y, avatar.AbsolutePosition.Z); 637 // avatarName, avatar.AbsolutePosition.X, avatar.AbsolutePosition.Y, avatar.AbsolutePosition.Z);
638 638
@@ -662,8 +662,8 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
662 parcelVoiceInfo = new LLSDParcelVoiceInfoResponse(scene.RegionInfo.RegionName, land.LocalID, creds); 662 parcelVoiceInfo = new LLSDParcelVoiceInfoResponse(scene.RegionInfo.RegionName, land.LocalID, creds);
663 string r = LLSDHelpers.SerialiseLLSDReply(parcelVoiceInfo); 663 string r = LLSDHelpers.SerialiseLLSDReply(parcelVoiceInfo);
664 664
665 m_log.DebugFormat("[VivoxVoice][PARCELVOICE]: region \"{0}\": Parcel \"{1}\" ({2}): avatar \"{3}\": {4}", 665// m_log.DebugFormat("[VivoxVoice][PARCELVOICE]: region \"{0}\": Parcel \"{1}\" ({2}): avatar \"{3}\": {4}",
666 scene.RegionInfo.RegionName, land.Name, land.LocalID, avatarName, r); 666// scene.RegionInfo.RegionName, land.Name, land.LocalID, avatarName, r);
667 return r; 667 return r;
668 } 668 }
669 catch (Exception e) 669 catch (Exception e)
@@ -690,11 +690,11 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
690 public string ChatSessionRequest(Scene scene, string request, string path, string param, 690 public string ChatSessionRequest(Scene scene, string request, string path, string param,
691 UUID agentID, Caps caps) 691 UUID agentID, Caps caps)
692 { 692 {
693 ScenePresence avatar = scene.GetScenePresence(agentID); 693// ScenePresence avatar = scene.GetScenePresence(agentID);
694 string avatarName = avatar.Name; 694// string avatarName = avatar.Name;
695 695
696 m_log.DebugFormat("[VivoxVoice][CHATSESSION]: avatar \"{0}\": request: {1}, path: {2}, param: {3}", 696// m_log.DebugFormat("[VivoxVoice][CHATSESSION]: avatar \"{0}\": request: {1}, path: {2}, param: {3}",
697 avatarName, request, path, param); 697// avatarName, request, path, param);
698 return "<llsd>true</llsd>"; 698 return "<llsd>true</llsd>";
699 } 699 }
700 700
@@ -744,7 +744,8 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
744 return channelUri; 744 return channelUri;
745 } 745 }
746 746
747 private static readonly string m_vivoxLoginPath = "http://{0}/api2/viv_signin.php?userid={1}&pwd={2}"; 747
748 private static readonly string m_vivoxLoginPath = "https://{0}/api2/viv_signin.php?userid={1}&pwd={2}";
748 749
749 /// <summary> 750 /// <summary>
750 /// Perform administrative login for Vivox. 751 /// Perform administrative login for Vivox.
@@ -756,7 +757,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
756 return VivoxCall(requrl, false); 757 return VivoxCall(requrl, false);
757 } 758 }
758 759
759 private static readonly string m_vivoxLogoutPath = "http://{0}/api2/viv_signout.php?auth_token={1}"; 760 private static readonly string m_vivoxLogoutPath = "https://{0}/api2/viv_signout.php?auth_token={1}";
760 761
761 /// <summary> 762 /// <summary>
762 /// Perform administrative logout for Vivox. 763 /// Perform administrative logout for Vivox.
@@ -767,7 +768,8 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
767 return VivoxCall(requrl, false); 768 return VivoxCall(requrl, false);
768 } 769 }
769 770
770 private static readonly string m_vivoxGetAccountPath = "http://{0}/api2/viv_get_acct.php?auth_token={1}&user_name={2}"; 771
772 private static readonly string m_vivoxGetAccountPath = "https://{0}/api2/viv_get_acct.php?auth_token={1}&user_name={2}";
771 773
772 /// <summary> 774 /// <summary>
773 /// Retrieve account information for the specified user. 775 /// Retrieve account information for the specified user.
@@ -779,7 +781,8 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
779 return VivoxCall(requrl, true); 781 return VivoxCall(requrl, true);
780 } 782 }
781 783
782 private static readonly string m_vivoxNewAccountPath = "http://{0}/api2/viv_adm_acct_new.php?username={1}&pwd={2}&auth_token={3}"; 784
785 private static readonly string m_vivoxNewAccountPath = "https://{0}/api2/viv_adm_acct_new.php?username={1}&pwd={2}&auth_token={3}";
783 786
784 /// <summary> 787 /// <summary>
785 /// Creates a new account. 788 /// Creates a new account.
@@ -793,7 +796,8 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
793 return VivoxCall(requrl, true); 796 return VivoxCall(requrl, true);
794 } 797 }
795 798
796 private static readonly string m_vivoxPasswordPath = "http://{0}/api2/viv_adm_password.php?user_name={1}&new_pwd={2}&auth_token={3}"; 799
800 private static readonly string m_vivoxPasswordPath = "https://{0}/api2/viv_adm_password.php?user_name={1}&new_pwd={2}&auth_token={3}";
797 801
798 /// <summary> 802 /// <summary>
799 /// Change the user's password. 803 /// Change the user's password.
@@ -804,7 +808,8 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
804 return VivoxCall(requrl, true); 808 return VivoxCall(requrl, true);
805 } 809 }
806 810
807 private static readonly string m_vivoxChannelPath = "http://{0}/api2/viv_chan_mod.php?mode={1}&chan_name={2}&auth_token={3}"; 811
812 private static readonly string m_vivoxChannelPath = "https://{0}/api2/viv_chan_mod.php?mode={1}&chan_name={2}&auth_token={3}";
808 813
809 /// <summary> 814 /// <summary>
810 /// Create a channel. 815 /// Create a channel.
@@ -876,7 +881,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
876 return false; 881 return false;
877 } 882 }
878 883
879 private static readonly string m_vivoxChannelSearchPath = "http://{0}/api2/viv_chan_search.php?cond_channame={1}&auth_token={2}"; 884 private static readonly string m_vivoxChannelSearchPath = "https://{0}/api2/viv_chan_search.php?cond_channame={1}&auth_token={2}";
880 885
881 /// <summary> 886 /// <summary>
882 /// Retrieve a channel. 887 /// Retrieve a channel.
@@ -1019,7 +1024,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
1019 return false; 1024 return false;
1020 } 1025 }
1021 1026
1022 // private static readonly string m_vivoxChannelById = "http://{0}/api2/viv_chan_mod.php?mode={1}&chan_id={2}&auth_token={3}"; 1027 // private static readonly string m_vivoxChannelById = "https://{0}/api2/viv_chan_mod.php?mode={1}&chan_id={2}&auth_token={3}";
1023 1028
1024 // private XmlElement VivoxGetChannelById(string parent, string channelid) 1029 // private XmlElement VivoxGetChannelById(string parent, string channelid)
1025 // { 1030 // {
@@ -1031,7 +1036,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
1031 // return VivoxCall(requrl, true); 1036 // return VivoxCall(requrl, true);
1032 // } 1037 // }
1033 1038
1034 private static readonly string m_vivoxChannelDel = "http://{0}/api2/viv_chan_mod.php?mode={1}&chan_id={2}&auth_token={3}"; 1039 private static readonly string m_vivoxChannelDel = "https://{0}/api2/viv_chan_mod.php?mode={1}&chan_id={2}&auth_token={3}";
1035 1040
1036 /// <summary> 1041 /// <summary>
1037 /// Delete a channel. 1042 /// Delete a channel.
@@ -1044,6 +1049,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
1044 /// are required in a later phase. 1049 /// are required in a later phase.
1045 /// In this case the call handles parent and description as optional values. 1050 /// In this case the call handles parent and description as optional values.
1046 /// </summary> 1051 /// </summary>
1052
1047 private XmlElement VivoxDeleteChannel(string parent, string channelid) 1053 private XmlElement VivoxDeleteChannel(string parent, string channelid)
1048 { 1054 {
1049 string requrl = String.Format(m_vivoxChannelDel, m_vivoxServer, "delete", channelid, m_authToken); 1055 string requrl = String.Format(m_vivoxChannelDel, m_vivoxServer, "delete", channelid, m_authToken);
@@ -1054,11 +1060,12 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
1054 return VivoxCall(requrl, true); 1060 return VivoxCall(requrl, true);
1055 } 1061 }
1056 1062
1057 private static readonly string m_vivoxChannelSearch = "http://{0}/api2/viv_chan_search.php?&cond_chanparent={1}&auth_token={2}"; 1063 private static readonly string m_vivoxChannelSearch = "https://{0}/api2/viv_chan_search.php?&cond_chanparent={1}&auth_token={2}";
1058 1064
1059 /// <summary> 1065 /// <summary>
1060 /// Return information on channels in the given directory 1066 /// Return information on channels in the given directory
1061 /// </summary> 1067 /// </summary>
1068
1062 private XmlElement VivoxListChildren(string channelid) 1069 private XmlElement VivoxListChildren(string channelid)
1063 { 1070 {
1064 string requrl = String.Format(m_vivoxChannelSearch, m_vivoxServer, channelid, m_authToken); 1071 string requrl = String.Format(m_vivoxChannelSearch, m_vivoxServer, channelid, m_authToken);
@@ -1124,7 +1131,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
1124 try 1131 try
1125 { 1132 {
1126 // Otherwise prepare the request 1133 // Otherwise prepare the request
1127 m_log.DebugFormat("[VivoxVoice] Sending request <{0}>", requrl); 1134 //m_log.DebugFormat("[VivoxVoice] Sending request <{0}>", requrl);
1128 1135
1129 HttpWebRequest req = (HttpWebRequest)WebRequest.Create(requrl); 1136 HttpWebRequest req = (HttpWebRequest)WebRequest.Create(requrl);
1130 1137
@@ -1325,4 +1332,4 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
1325 return false; 1332 return false;
1326 } 1333 }
1327 } 1334 }
1328} \ No newline at end of file 1335}
diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs
index 32fb54b..d0a5989 100644
--- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs
+++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs
@@ -921,7 +921,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
921 msg.dialog = dialog; 921 msg.dialog = dialog;
922 // msg.dialog = (byte)OpenMetaverse.InstantMessageDialog.GroupNotice; 922 // msg.dialog = (byte)OpenMetaverse.InstantMessageDialog.GroupNotice;
923 msg.fromGroup = true; 923 msg.fromGroup = true;
924 msg.offline = (byte)0; 924 msg.offline = (byte)1; // Allow this message to be stored for offline use
925 msg.ParentEstateID = 0; 925 msg.ParentEstateID = 0;
926 msg.Position = Vector3.Zero; 926 msg.Position = Vector3.Zero;
927 msg.RegionID = UUID.Zero.Guid; 927 msg.RegionID = UUID.Zero.Guid;
diff --git a/OpenSim/Region/OptionalModules/PrimLimitsModule/PrimLimitsModule.cs b/OpenSim/Region/OptionalModules/PrimLimitsModule/PrimLimitsModule.cs
index a6d43f1..a375da9 100644
--- a/OpenSim/Region/OptionalModules/PrimLimitsModule/PrimLimitsModule.cs
+++ b/OpenSim/Region/OptionalModules/PrimLimitsModule/PrimLimitsModule.cs
@@ -122,28 +122,40 @@ namespace OpenSim.Region.OptionalModules
122 122
123 private bool CanObjectEnter(UUID objectID, bool enteringRegion, Vector3 newPoint, Scene scene) 123 private bool CanObjectEnter(UUID objectID, bool enteringRegion, Vector3 newPoint, Scene scene)
124 { 124 {
125 if (newPoint.X < -1f || newPoint.X > (float)(Constants.RegionSize + 1) ||
126 newPoint.Y < -1f || newPoint.Y > (float)(Constants.RegionSize + 1))
127 return true;
128
125 SceneObjectPart obj = scene.GetSceneObjectPart(objectID); 129 SceneObjectPart obj = scene.GetSceneObjectPart(objectID);
126 Vector3 oldPoint = obj.GroupPosition; 130
127 int objectCount = obj.ParentGroup.PrimCount; 131 if (obj == null)
128 ILandObject oldParcel = scene.LandChannel.GetLandObject(oldPoint.X, oldPoint.Y); 132 return false;
133
134 // Prim counts are determined by the location of the root prim. if we're
135 // moving a child prim, just let it pass
136 if (!obj.IsRoot)
137 {
138 return true;
139 }
140
129 ILandObject newParcel = scene.LandChannel.GetLandObject(newPoint.X, newPoint.Y); 141 ILandObject newParcel = scene.LandChannel.GetLandObject(newPoint.X, newPoint.Y);
130 142
131 int usedPrims = newParcel.PrimCounts.Total; 143 if (newParcel == null)
132 int simulatorCapacity = newParcel.GetSimulatorMaxPrimCount(); 144 return true;
145
146 Vector3 oldPoint = obj.GroupPosition;
147 ILandObject oldParcel = scene.LandChannel.GetLandObject(oldPoint.X, oldPoint.Y);
133 148
134 // The prim hasn't crossed a region boundry so we don't need to worry 149 // The prim hasn't crossed a region boundry so we don't need to worry
135 // about prim counts here 150 // about prim counts here
136 if(oldParcel.Equals(newParcel)) 151 if(oldParcel != null && oldParcel.Equals(newParcel))
137 { 152 {
138 return true; 153 return true;
139 } 154 }
140 155
141 // Prim counts are determined by the location of the root prim. if we're 156 int objectCount = obj.ParentGroup.PrimCount;
142 // moving a child prim, just let it pass 157 int usedPrims = newParcel.PrimCounts.Total;
143 if(!obj.IsRoot) 158 int simulatorCapacity = newParcel.GetSimulatorMaxPrimCount();
144 {
145 return true;
146 }
147 159
148 // TODO: Add Special Case here for temporary prims 160 // TODO: Add Special Case here for temporary prims
149 161
@@ -172,4 +184,4 @@ namespace OpenSim.Region.OptionalModules
172 return true; 184 return true;
173 } 185 }
174 } 186 }
175} \ No newline at end of file 187}
diff --git a/OpenSim/Region/OptionalModules/Scripting/XmlRpcRouterModule/XmlRpcRouterModule.cs b/OpenSim/Region/OptionalModules/Scripting/XmlRpcRouterModule/XmlRpcRouterModule.cs
index 943675e..32549d6 100644
--- a/OpenSim/Region/OptionalModules/Scripting/XmlRpcRouterModule/XmlRpcRouterModule.cs
+++ b/OpenSim/Region/OptionalModules/Scripting/XmlRpcRouterModule/XmlRpcRouterModule.cs
@@ -98,7 +98,10 @@ namespace OpenSim.Region.OptionalModules.Scripting.XmlRpcRouterModule
98 98
99 public void RegisterNewReceiver(IScriptModule scriptEngine, UUID channel, UUID objectID, UUID itemID, string uri) 99 public void RegisterNewReceiver(IScriptModule scriptEngine, UUID channel, UUID objectID, UUID itemID, string uri)
100 { 100 {
101 scriptEngine.PostScriptEvent(itemID, "xmlrpc_uri", new Object[] {uri}); 101 if (m_Enabled)
102 {
103 scriptEngine.PostScriptEvent(itemID, "xmlrpc_uri", new Object[] { uri });
104 }
102 } 105 }
103 106
104 public void UnRegisterReceiver(string channelID, UUID itemID) 107 public void UnRegisterReceiver(string channelID, UUID itemID)
diff --git a/OpenSim/Region/OptionalModules/ViewerSupport/DynamicFloaterModule.cs b/OpenSim/Region/OptionalModules/ViewerSupport/DynamicFloaterModule.cs
new file mode 100644
index 0000000..e76e8f2
--- /dev/null
+++ b/OpenSim/Region/OptionalModules/ViewerSupport/DynamicFloaterModule.cs
@@ -0,0 +1,238 @@
1/*
2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSimulator Project nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28using System;
29using System.IO;
30using System.Reflection;
31using System.Text;
32using System.Collections.Generic;
33using OpenMetaverse;
34using OpenMetaverse.StructuredData;
35using OpenSim;
36using OpenSim.Region;
37using OpenSim.Region.Framework;
38using OpenSim.Region.Framework.Scenes;
39using OpenSim.Region.Framework.Interfaces;
40using OpenSim.Framework;
41using OpenSim.Framework.Servers;
42using OpenSim.Framework.Servers.HttpServer;
43using Nini.Config;
44using log4net;
45using Mono.Addins;
46using Caps = OpenSim.Framework.Capabilities.Caps;
47using OSDMap = OpenMetaverse.StructuredData.OSDMap;
48
49namespace OpenSim.Region.OptionalModules.ViewerSupport
50{
51 [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "DynamicFloater")]
52 public class DynamicFloaterModule : INonSharedRegionModule, IDynamicFloaterModule
53 {
54 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
55
56 private Scene m_scene;
57
58 private Dictionary<UUID, Dictionary<int, FloaterData>> m_floaters = new Dictionary<UUID, Dictionary<int, FloaterData>>();
59
60 public string Name
61 {
62 get { return "DynamicFloaterModule"; }
63 }
64
65 public Type ReplaceableInterface
66 {
67 get { return null; }
68 }
69
70 public void Initialise(IConfigSource config)
71 {
72 }
73
74 public void Close()
75 {
76 }
77
78 public void AddRegion(Scene scene)
79 {
80 m_scene = scene;
81 scene.EventManager.OnNewClient += OnNewClient;
82 scene.EventManager.OnClientClosed += OnClientClosed;
83 m_scene.RegisterModuleInterface<IDynamicFloaterModule>(this);
84 }
85
86 public void RegionLoaded(Scene scene)
87 {
88 }
89
90 public void RemoveRegion(Scene scene)
91 {
92 }
93
94 private void OnNewClient(IClientAPI client)
95 {
96 client.OnChatFromClient += OnChatFromClient;
97 }
98
99 private void OnClientClosed(UUID agentID, Scene scene)
100 {
101 m_floaters.Remove(agentID);
102 }
103
104 private void SendToClient(ScenePresence sp, string msg)
105 {
106 sp.ControllingClient.SendChatMessage(msg,
107 (byte)ChatTypeEnum.Owner,
108 sp.AbsolutePosition,
109 "Server",
110 UUID.Zero,
111 UUID.Zero,
112 (byte)ChatSourceType.Object,
113 (byte)ChatAudibleLevel.Fully);
114 }
115
116 public void DoUserFloater(UUID agentID, FloaterData dialogData, string configuration)
117 {
118 ScenePresence sp = m_scene.GetScenePresence(agentID);
119 if (sp == null || sp.IsChildAgent)
120 return;
121
122 if (!m_floaters.ContainsKey(agentID))
123 m_floaters[agentID] = new Dictionary<int, FloaterData>();
124
125 if (m_floaters[agentID].ContainsKey(dialogData.Channel))
126 return;
127
128 m_floaters[agentID].Add(dialogData.Channel, dialogData);
129
130 string xml;
131 if (dialogData.XmlText != null && dialogData.XmlText != String.Empty)
132 {
133 xml = dialogData.XmlText;
134 }
135 else
136 {
137 using (FileStream fs = File.Open(dialogData.XmlName + ".xml", FileMode.Open))
138 {
139 using (StreamReader sr = new StreamReader(fs))
140 xml = sr.ReadToEnd().Replace("\n", "");
141 }
142 }
143
144 List<string> xparts = new List<string>();
145
146 while (xml.Length > 0)
147 {
148 string x = xml;
149 if (x.Length > 600)
150 {
151 x = x.Substring(0, 600);
152 xml = xml.Substring(600);
153 }
154 else
155 {
156 xml = String.Empty;
157 }
158
159 xparts.Add(x);
160 }
161
162 for (int i = 0 ; i < xparts.Count ; i++)
163 SendToClient(sp, String.Format("># floater {2} create {0}/{1} " + xparts[i], i + 1, xparts.Count, dialogData.FloaterName));
164
165 SendToClient(sp, String.Format("># floater {0} {{notify:1}} {{channel: {1}}} {{node:cancel {{notify:1}}}} {{node:ok {{notify:1}}}} {2}", dialogData.FloaterName, (uint)dialogData.Channel, configuration));
166 }
167
168 private void OnChatFromClient(object sender, OSChatMessage msg)
169 {
170 if (msg.Sender == null)
171 return;
172
173 //m_log.DebugFormat("chan {0} msg {1}", msg.Channel, msg.Message);
174
175 IClientAPI client = msg.Sender;
176
177 if (!m_floaters.ContainsKey(client.AgentId))
178 return;
179
180 string[] parts = msg.Message.Split(new char[] {':'});
181 if (parts.Length == 0)
182 return;
183
184 ScenePresence sp = m_scene.GetScenePresence(client.AgentId);
185 if (sp == null || sp.IsChildAgent)
186 return;
187
188 Dictionary<int, FloaterData> d = m_floaters[client.AgentId];
189
190 // Work around a viewer bug - VALUE from any
191 // dialog can appear on this channel and needs to
192 // be dispatched to ALL open dialogs for the user
193 if (msg.Channel == 427169570)
194 {
195 if (parts[0] == "VALUE")
196 {
197 foreach (FloaterData dd in d.Values)
198 {
199 if(dd.Handler(client, dd, parts))
200 {
201 m_floaters[client.AgentId].Remove(dd.Channel);
202 SendToClient(sp, String.Format("># floater {0} destroy", dd.FloaterName));
203 break;
204 }
205 }
206 }
207 return;
208 }
209
210 if (!d.ContainsKey(msg.Channel))
211 return;
212
213 FloaterData data = d[msg.Channel];
214
215 if (parts[0] == "NOTIFY")
216 {
217 if (parts[1] == "cancel" || parts[1] == data.FloaterName)
218 {
219 m_floaters[client.AgentId].Remove(data.Channel);
220 SendToClient(sp, String.Format("># floater {0} destroy", data.FloaterName));
221 }
222 }
223
224 if (data.Handler != null && data.Handler(client, data, parts))
225 {
226 m_floaters[client.AgentId].Remove(data.Channel);
227 SendToClient(sp, String.Format("># floater {0} destroy", data.FloaterName));
228 }
229 }
230
231 public void FloaterControl(ScenePresence sp, FloaterData d, string msg)
232 {
233 string sendData = String.Format("># floater {0} {1}", d.FloaterName, msg);
234 SendToClient(sp, sendData);
235
236 }
237 }
238}
diff --git a/OpenSim/Region/OptionalModules/ViewerSupport/DynamicMenuModule.cs b/OpenSim/Region/OptionalModules/ViewerSupport/DynamicMenuModule.cs
index 1ea1c20..c68fe99 100644
--- a/OpenSim/Region/OptionalModules/ViewerSupport/DynamicMenuModule.cs
+++ b/OpenSim/Region/OptionalModules/ViewerSupport/DynamicMenuModule.cs
@@ -1,29 +1,8 @@
1/* 1// ******************************************************************
2 * Copyright (c) Contributors, http://opensimulator.org/ 2// Copyright (c) 2008, 2009 Melanie Thielker
3 * See CONTRIBUTORS.TXT for a full list of copyright holders. 3//
4 * 4// All rights reserved
5 * Redistribution and use in source and binary forms, with or without 5//
6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSimulator Project nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27 6
28using System; 7using System;
29using System.IO; 8using System.IO;
@@ -131,8 +110,11 @@ namespace OpenSim.Region.OptionalModules.ViewerSupport
131 { 110 {
132 foreach (MenuItemData d in m_menuItems[UUID.Zero]) 111 foreach (MenuItemData d in m_menuItems[UUID.Zero])
133 { 112 {
134 if (d.Mode == UserMode.God && (!m_scene.Permissions.IsGod(agentID))) 113 if (!m_scene.Permissions.IsGod(agentID))
135 continue; 114 {
115 if (d.Mode == UserMode.RegionManager && (!m_scene.Permissions.IsAdministrator(agentID)))
116 continue;
117 }
136 118
137 OSDMap loc = null; 119 OSDMap loc = null;
138 switch (d.Location) 120 switch (d.Location)
diff --git a/OpenSim/Region/OptionalModules/World/MoneyModule/SampleMoneyModule.cs b/OpenSim/Region/OptionalModules/World/MoneyModule/SampleMoneyModule.cs
index 1345db9..25f198b 100644
--- a/OpenSim/Region/OptionalModules/World/MoneyModule/SampleMoneyModule.cs
+++ b/OpenSim/Region/OptionalModules/World/MoneyModule/SampleMoneyModule.cs
@@ -203,7 +203,7 @@ namespace OpenSim.Region.OptionalModules.World.MoneyModule
203 { 203 {
204 } 204 }
205 205
206 public bool ObjectGiveMoney(UUID objectID, UUID fromID, UUID toID, int amount) 206 public bool ObjectGiveMoney(UUID objectID, UUID fromID, UUID toID, int amount, UUID txn)
207 { 207 {
208 string description = String.Format("Object {0} pays {1}", resolveObjectName(objectID), resolveAgentName(toID)); 208 string description = String.Format("Object {0} pays {1}", resolveObjectName(objectID), resolveAgentName(toID));
209 209
@@ -840,6 +840,10 @@ namespace OpenSim.Region.OptionalModules.World.MoneyModule
840 if (module != null) 840 if (module != null)
841 module.BuyObject(remoteClient, categoryID, localID, saleType, salePrice); 841 module.BuyObject(remoteClient, categoryID, localID, saleType, salePrice);
842 } 842 }
843
844 public void MoveMoney(UUID fromAgentID, UUID toAgentID, int amount, string text)
845 {
846 }
843 } 847 }
844 848
845 public enum TransactionType : int 849 public enum TransactionType : int
diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs
index 592e4e1..c8aab54 100644
--- a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs
+++ b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs
@@ -47,7 +47,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC
47 private readonly string m_firstname; 47 private readonly string m_firstname;
48 private readonly string m_lastname; 48 private readonly string m_lastname;
49 private readonly Vector3 m_startPos; 49 private readonly Vector3 m_startPos;
50 private readonly UUID m_uuid = UUID.Random(); 50 private UUID m_uuid = UUID.Random();
51 private readonly Scene m_scene; 51 private readonly Scene m_scene;
52 private readonly UUID m_ownerID; 52 private readonly UUID m_ownerID;
53 53
@@ -221,7 +221,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC
221#pragma warning disable 67 221#pragma warning disable 67
222 public event Action<IClientAPI> OnLogout; 222 public event Action<IClientAPI> OnLogout;
223 public event ObjectPermissions OnObjectPermissions; 223 public event ObjectPermissions OnObjectPermissions;
224 224 public event MoveItemsAndLeaveCopy OnMoveItemsAndLeaveCopy;
225 public event MoneyTransferRequest OnMoneyTransferRequest; 225 public event MoneyTransferRequest OnMoneyTransferRequest;
226 public event ParcelBuy OnParcelBuy; 226 public event ParcelBuy OnParcelBuy;
227 public event Action<IClientAPI> OnConnectionClosed; 227 public event Action<IClientAPI> OnConnectionClosed;
@@ -241,6 +241,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC
241 public event ObjectDrop OnObjectDrop; 241 public event ObjectDrop OnObjectDrop;
242 public event StartAnim OnStartAnim; 242 public event StartAnim OnStartAnim;
243 public event StopAnim OnStopAnim; 243 public event StopAnim OnStopAnim;
244 public event ChangeAnim OnChangeAnim;
244 public event LinkObjects OnLinkObjects; 245 public event LinkObjects OnLinkObjects;
245 public event DelinkObjects OnDelinkObjects; 246 public event DelinkObjects OnDelinkObjects;
246 public event RequestMapBlocks OnRequestMapBlocks; 247 public event RequestMapBlocks OnRequestMapBlocks;
@@ -290,6 +291,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC
290 public event UpdatePrimTexture OnUpdatePrimTexture; 291 public event UpdatePrimTexture OnUpdatePrimTexture;
291 public event UpdateVector OnUpdatePrimGroupPosition; 292 public event UpdateVector OnUpdatePrimGroupPosition;
292 public event UpdateVector OnUpdatePrimSinglePosition; 293 public event UpdateVector OnUpdatePrimSinglePosition;
294 public event ClientChangeObject onClientChangeObject;
293 public event UpdatePrimRotation OnUpdatePrimGroupRotation; 295 public event UpdatePrimRotation OnUpdatePrimGroupRotation;
294 public event UpdatePrimSingleRotationPosition OnUpdatePrimSingleRotationPosition; 296 public event UpdatePrimSingleRotationPosition OnUpdatePrimSingleRotationPosition;
295 public event UpdatePrimSingleRotation OnUpdatePrimSingleRotation; 297 public event UpdatePrimSingleRotation OnUpdatePrimSingleRotation;
@@ -428,7 +430,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC
428 public event ClassifiedInfoRequest OnClassifiedInfoRequest; 430 public event ClassifiedInfoRequest OnClassifiedInfoRequest;
429 public event ClassifiedInfoUpdate OnClassifiedInfoUpdate; 431 public event ClassifiedInfoUpdate OnClassifiedInfoUpdate;
430 public event ClassifiedDelete OnClassifiedDelete; 432 public event ClassifiedDelete OnClassifiedDelete;
431 public event ClassifiedDelete OnClassifiedGodDelete; 433 public event ClassifiedGodDelete OnClassifiedGodDelete;
432 434
433 public event EventNotificationAddRequest OnEventNotificationAddRequest; 435 public event EventNotificationAddRequest OnEventNotificationAddRequest;
434 public event EventNotificationRemoveRequest OnEventNotificationRemoveRequest; 436 public event EventNotificationRemoveRequest OnEventNotificationRemoveRequest;
@@ -467,11 +469,12 @@ namespace OpenSim.Region.OptionalModules.World.NPC
467 public event GroupVoteHistoryRequest OnGroupVoteHistoryRequest; 469 public event GroupVoteHistoryRequest OnGroupVoteHistoryRequest;
468 public event SimWideDeletesDelegate OnSimWideDeletes; 470 public event SimWideDeletesDelegate OnSimWideDeletes;
469 public event SendPostcard OnSendPostcard; 471 public event SendPostcard OnSendPostcard;
472 public event ChangeInventoryItemFlags OnChangeInventoryItemFlags;
470 public event MuteListEntryUpdate OnUpdateMuteListEntry; 473 public event MuteListEntryUpdate OnUpdateMuteListEntry;
471 public event MuteListEntryRemove OnRemoveMuteListEntry; 474 public event MuteListEntryRemove OnRemoveMuteListEntry;
472 public event GodlikeMessage onGodlikeMessage; 475 public event GodlikeMessage onGodlikeMessage;
473 public event GodUpdateRegionInfoUpdate OnGodUpdateRegionInfoUpdate; 476 public event GodUpdateRegionInfoUpdate OnGodUpdateRegionInfoUpdate;
474 477 public event GenericCall2 OnUpdateThrottles;
475#pragma warning restore 67 478#pragma warning restore 67
476 479
477 #endregion 480 #endregion
@@ -494,6 +497,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC
494 public virtual UUID AgentId 497 public virtual UUID AgentId
495 { 498 {
496 get { return m_uuid; } 499 get { return m_uuid; }
500 set { m_uuid = value; }
497 } 501 }
498 502
499 public UUID SessionId 503 public UUID SessionId
@@ -599,6 +603,12 @@ namespace OpenSim.Region.OptionalModules.World.NPC
599 public virtual void SetChildAgentThrottle(byte[] throttle) 603 public virtual void SetChildAgentThrottle(byte[] throttle)
600 { 604 {
601 } 605 }
606
607 public void SetAgentThrottleSilent(int throttle, int setting)
608 {
609
610
611 }
602 public byte[] GetThrottlesPacked(float multiplier) 612 public byte[] GetThrottlesPacked(float multiplier)
603 { 613 {
604 return new byte[0]; 614 return new byte[0];
@@ -743,6 +753,10 @@ namespace OpenSim.Region.OptionalModules.World.NPC
743 { 753 {
744 } 754 }
745 755
756 public void SendInventoryItemCreateUpdate(InventoryItemBase Item, UUID transactionID, uint callbackId)
757 {
758 }
759
746 public virtual void SendRemoveInventoryItem(UUID itemID) 760 public virtual void SendRemoveInventoryItem(UUID itemID)
747 { 761 {
748 } 762 }
@@ -759,7 +773,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC
759 { 773 {
760 } 774 }
761 775
762 public virtual void SendXferPacket(ulong xferID, uint packet, byte[] data) 776 public virtual void SendXferPacket(ulong xferID, uint packet, byte[] data, bool isTaskInventory)
763 { 777 {
764 } 778 }
765 public virtual void SendAbortXferPacket(ulong xferID) 779 public virtual void SendAbortXferPacket(ulong xferID)
@@ -904,10 +918,10 @@ namespace OpenSim.Region.OptionalModules.World.NPC
904 918
905 public void Close() 919 public void Close()
906 { 920 {
907 Close(false); 921 Close(true, false);
908 } 922 }
909 923
910 public void Close(bool force) 924 public void Close(bool sendStop, bool force)
911 { 925 {
912 // Remove ourselves from the scene 926 // Remove ourselves from the scene
913 m_scene.RemoveClient(AgentId, false); 927 m_scene.RemoveClient(AgentId, false);
diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs
index 7d46d92..8c9c006 100644
--- a/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs
+++ b/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs
@@ -143,10 +143,9 @@ namespace OpenSim.Region.OptionalModules.World.NPC
143 npcAvatar.CircuitCode = (uint)Util.RandomClass.Next(0, 143 npcAvatar.CircuitCode = (uint)Util.RandomClass.Next(0,
144 int.MaxValue); 144 int.MaxValue);
145 145
146 m_log.DebugFormat( 146// m_log.DebugFormat(
147 "[NPC MODULE]: Creating NPC {0} {1} {2}, owner={3}, senseAsAgent={4} at {5} in {6}", 147// "[NPC MODULE]: Creating NPC {0} {1} {2}, owner={3}, senseAsAgent={4} at {5} in {6}",
148 firstname, lastname, npcAvatar.AgentId, owner, 148// firstname, lastname, npcAvatar.AgentId, owner, senseAsAgent, position, scene.RegionInfo.RegionName);
149 senseAsAgent, position, scene.RegionInfo.RegionName);
150 149
151 AgentCircuitData acd = new AgentCircuitData(); 150 AgentCircuitData acd = new AgentCircuitData();
152 acd.AgentID = npcAvatar.AgentId; 151 acd.AgentID = npcAvatar.AgentId;
@@ -169,36 +168,30 @@ namespace OpenSim.Region.OptionalModules.World.NPC
169 } 168 }
170 */ 169 */
171 170
172 lock (m_avatars) 171 ManualResetEvent ev = new ManualResetEvent(false);
173 {
174 scene.AuthenticateHandler.AddNewCircuit(npcAvatar.CircuitCode,
175 acd);
176 scene.AddNewClient(npcAvatar, PresenceType.Npc);
177 172
178 ScenePresence sp; 173 Util.FireAndForget(delegate(object x) {
179 if (scene.TryGetScenePresence(npcAvatar.AgentId, out sp)) 174 lock (m_avatars)
180 { 175 {
181 /* 176 scene.AuthenticateHandler.AddNewCircuit(npcAvatar.CircuitCode, acd);
182 m_log.DebugFormat( 177 scene.AddNewClient(npcAvatar, PresenceType.Npc);
183 "[NPC MODULE]: Successfully retrieved scene presence for NPC {0} {1}",
184 sp.Name, sp.UUID);
185 */
186
187 sp.CompleteMovement(npcAvatar, false);
188 m_avatars.Add(npcAvatar.AgentId, npcAvatar);
189 m_log.DebugFormat("[NPC MODULE]: Created NPC {0} {1}",
190 npcAvatar.AgentId, sp.Name);
191 178
192 return npcAvatar.AgentId; 179 ScenePresence sp;
193 } 180 if (scene.TryGetScenePresence(npcAvatar.AgentId, out sp))
194 else 181 {
195 { 182 sp.CompleteMovement(npcAvatar, false);
196 m_log.WarnFormat( 183 m_avatars.Add(npcAvatar.AgentId, npcAvatar);
197 "[NPC MODULE]: Could not find scene presence for NPC {0} {1}", 184// m_log.DebugFormat("[NPC MODULE]: Created NPC {0} {1}", npcAvatar.AgentId, sp.Name);
198 sp.Name, sp.UUID); 185 }
199 return UUID.Zero;
200 } 186 }
201 } 187 ev.Set();
188 });
189
190 ev.WaitOne();
191
192// m_log.DebugFormat("[NPC MODULE]: Created NPC with id {0}", npcAvatar.AgentId);
193
194 return npcAvatar.AgentId;
202 } 195 }
203 196
204 public bool MoveToTarget(UUID agentID, Scene scene, Vector3 pos, 197 public bool MoveToTarget(UUID agentID, Scene scene, Vector3 pos,
@@ -211,10 +204,9 @@ namespace OpenSim.Region.OptionalModules.World.NPC
211 ScenePresence sp; 204 ScenePresence sp;
212 if (scene.TryGetScenePresence(agentID, out sp)) 205 if (scene.TryGetScenePresence(agentID, out sp))
213 { 206 {
214 m_log.DebugFormat( 207// m_log.DebugFormat(
215 "[NPC MODULE]: Moving {0} to {1} in {2}, noFly {3}, landAtTarget {4}", 208// "[NPC MODULE]: Moving {0} to {1} in {2}, noFly {3}, landAtTarget {4}",
216 sp.Name, pos, scene.RegionInfo.RegionName, 209// sp.Name, pos, scene.RegionInfo.RegionName, noFly, landAtTarget);
217 noFly, landAtTarget);
218 210
219 sp.MoveToTarget(pos, noFly, landAtTarget); 211 sp.MoveToTarget(pos, noFly, landAtTarget);
220 sp.SetAlwaysRun = running; 212 sp.SetAlwaysRun = running;
@@ -385,10 +377,8 @@ namespace OpenSim.Region.OptionalModules.World.NPC
385 */ 377 */
386 scene.RemoveClient(agentID, false); 378 scene.RemoveClient(agentID, false);
387 m_avatars.Remove(agentID); 379 m_avatars.Remove(agentID);
388 /* 380
389 m_log.DebugFormat("[NPC MODULE]: Removed NPC {0} {1}", 381// m_log.DebugFormat("[NPC MODULE]: Removed NPC {0} {1}", agentID, av.Name);
390 agentID, av.Name);
391 */
392 return true; 382 return true;
393 } 383 }
394 } 384 }
@@ -405,9 +395,15 @@ namespace OpenSim.Region.OptionalModules.World.NPC
405 { 395 {
406 NPCAvatar av; 396 NPCAvatar av;
407 if (m_avatars.TryGetValue(npcID, out av)) 397 if (m_avatars.TryGetValue(npcID, out av))
398 {
399 if (npcID == callerID)
400 return true;
408 return CheckPermissions(av, callerID); 401 return CheckPermissions(av, callerID);
402 }
409 else 403 else
404 {
410 return false; 405 return false;
406 }
411 } 407 }
412 } 408 }
413 409
@@ -419,8 +415,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC
419 /// <returns>true if they do, false if they don't.</returns> 415 /// <returns>true if they do, false if they don't.</returns>
420 private bool CheckPermissions(NPCAvatar av, UUID callerID) 416 private bool CheckPermissions(NPCAvatar av, UUID callerID)
421 { 417 {
422 return callerID == UUID.Zero || av.OwnerID == UUID.Zero || 418 return callerID == UUID.Zero || av.OwnerID == UUID.Zero || av.OwnerID == callerID || av.AgentId == callerID;
423 av.OwnerID == callerID;
424 } 419 }
425 } 420 }
426} 421}
diff --git a/OpenSim/Region/OptionalModules/World/NPC/Tests/NPCModuleTests.cs b/OpenSim/Region/OptionalModules/World/NPC/Tests/NPCModuleTests.cs
index bf23040..34362af 100644
--- a/OpenSim/Region/OptionalModules/World/NPC/Tests/NPCModuleTests.cs
+++ b/OpenSim/Region/OptionalModules/World/NPC/Tests/NPCModuleTests.cs
@@ -110,7 +110,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC.Tests
110 // ScenePresence.SendInitialData() to reset our entire appearance. 110 // ScenePresence.SendInitialData() to reset our entire appearance.
111 m_scene.AssetService.Store(AssetHelpers.CreateNotecardAsset(originalFace8TextureId)); 111 m_scene.AssetService.Store(AssetHelpers.CreateNotecardAsset(originalFace8TextureId));
112 112
113 m_afMod.SetAppearance(sp, originalTe, null); 113 m_afMod.SetAppearance(sp, originalTe, null, new WearableCacheItem[0] );
114 114
115 UUID npcId = m_npcMod.CreateNPC("John", "Smith", new Vector3(128, 128, 30), UUID.Zero, true, m_scene, sp.Appearance); 115 UUID npcId = m_npcMod.CreateNPC("John", "Smith", new Vector3(128, 128, 30), UUID.Zero, true, m_scene, sp.Appearance);
116 116