diff options
Diffstat (limited to 'OpenSim/Region/OptionalModules')
14 files changed, 392 insertions, 120 deletions
diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs index b3fdd22..373ed41 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; |
@@ -717,6 +718,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server | |||
717 | public event RequestObjectPropertiesFamily OnRequestObjectPropertiesFamily; | 718 | public event RequestObjectPropertiesFamily OnRequestObjectPropertiesFamily; |
718 | public event UpdatePrimFlags OnUpdatePrimFlags; | 719 | public event UpdatePrimFlags OnUpdatePrimFlags; |
719 | public event UpdatePrimTexture OnUpdatePrimTexture; | 720 | public event UpdatePrimTexture OnUpdatePrimTexture; |
721 | public event ClientChangeObject onClientChangeObject; | ||
720 | public event UpdateVector OnUpdatePrimGroupPosition; | 722 | public event UpdateVector OnUpdatePrimGroupPosition; |
721 | public event UpdateVector OnUpdatePrimSinglePosition; | 723 | public event UpdateVector OnUpdatePrimSinglePosition; |
722 | public event UpdatePrimRotation OnUpdatePrimGroupRotation; | 724 | public event UpdatePrimRotation OnUpdatePrimGroupRotation; |
@@ -821,6 +823,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server | |||
821 | public event ObjectOwner OnObjectOwner; | 823 | public event ObjectOwner OnObjectOwner; |
822 | public event DirPlacesQuery OnDirPlacesQuery; | 824 | public event DirPlacesQuery OnDirPlacesQuery; |
823 | public event DirFindQuery OnDirFindQuery; | 825 | public event DirFindQuery OnDirFindQuery; |
826 | public event MoveItemsAndLeaveCopy OnMoveItemsAndLeaveCopy; | ||
824 | public event DirLandQuery OnDirLandQuery; | 827 | public event DirLandQuery OnDirLandQuery; |
825 | public event DirPopularQuery OnDirPopularQuery; | 828 | public event DirPopularQuery OnDirPopularQuery; |
826 | public event DirClassifiedQuery OnDirClassifiedQuery; | 829 | public event DirClassifiedQuery OnDirClassifiedQuery; |
@@ -837,7 +840,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server | |||
837 | public event ClassifiedInfoRequest OnClassifiedInfoRequest; | 840 | public event ClassifiedInfoRequest OnClassifiedInfoRequest; |
838 | public event ClassifiedInfoUpdate OnClassifiedInfoUpdate; | 841 | public event ClassifiedInfoUpdate OnClassifiedInfoUpdate; |
839 | public event ClassifiedDelete OnClassifiedDelete; | 842 | public event ClassifiedDelete OnClassifiedDelete; |
840 | public event ClassifiedDelete OnClassifiedGodDelete; | 843 | public event ClassifiedGodDelete OnClassifiedGodDelete; |
841 | public event EventNotificationAddRequest OnEventNotificationAddRequest; | 844 | public event EventNotificationAddRequest OnEventNotificationAddRequest; |
842 | public event EventNotificationRemoveRequest OnEventNotificationRemoveRequest; | 845 | public event EventNotificationRemoveRequest OnEventNotificationRemoveRequest; |
843 | public event EventGodDelete OnEventGodDelete; | 846 | public event EventGodDelete OnEventGodDelete; |
@@ -867,10 +870,12 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server | |||
867 | public event GroupVoteHistoryRequest OnGroupVoteHistoryRequest; | 870 | public event GroupVoteHistoryRequest OnGroupVoteHistoryRequest; |
868 | public event SimWideDeletesDelegate OnSimWideDeletes; | 871 | public event SimWideDeletesDelegate OnSimWideDeletes; |
869 | public event SendPostcard OnSendPostcard; | 872 | public event SendPostcard OnSendPostcard; |
873 | public event ChangeInventoryItemFlags OnChangeInventoryItemFlags; | ||
870 | public event MuteListEntryUpdate OnUpdateMuteListEntry; | 874 | public event MuteListEntryUpdate OnUpdateMuteListEntry; |
871 | public event MuteListEntryRemove OnRemoveMuteListEntry; | 875 | public event MuteListEntryRemove OnRemoveMuteListEntry; |
872 | public event GodlikeMessage onGodlikeMessage; | 876 | public event GodlikeMessage onGodlikeMessage; |
873 | public event GodUpdateRegionInfoUpdate OnGodUpdateRegionInfoUpdate; | 877 | public event GodUpdateRegionInfoUpdate OnGodUpdateRegionInfoUpdate; |
878 | public event GenericCall2 OnUpdateThrottles; | ||
874 | 879 | ||
875 | #pragma warning restore 67 | 880 | #pragma warning restore 67 |
876 | 881 | ||
@@ -888,10 +893,10 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server | |||
888 | 893 | ||
889 | public void Close() | 894 | public void Close() |
890 | { | 895 | { |
891 | Close(false); | 896 | Close(true, false); |
892 | } | 897 | } |
893 | 898 | ||
894 | public void Close(bool force) | 899 | public void Close(bool sendStop, bool force) |
895 | { | 900 | { |
896 | Disconnect(); | 901 | Disconnect(); |
897 | } | 902 | } |
@@ -1104,7 +1109,12 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server | |||
1104 | 1109 | ||
1105 | public void SendInventoryItemCreateUpdate(InventoryItemBase Item, uint callbackId) | 1110 | public void SendInventoryItemCreateUpdate(InventoryItemBase Item, uint callbackId) |
1106 | { | 1111 | { |
1107 | 1112 | ||
1113 | } | ||
1114 | |||
1115 | public void SendInventoryItemCreateUpdate(InventoryItemBase Item, UUID transactionID, uint callbackId) | ||
1116 | { | ||
1117 | |||
1108 | } | 1118 | } |
1109 | 1119 | ||
1110 | public void SendRemoveInventoryItem(UUID itemID) | 1120 | public void SendRemoveInventoryItem(UUID itemID) |
@@ -1127,7 +1137,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server | |||
1127 | 1137 | ||
1128 | } | 1138 | } |
1129 | 1139 | ||
1130 | public void SendXferPacket(ulong xferID, uint packet, byte[] data) | 1140 | public void SendXferPacket(ulong xferID, uint packet, byte[] data, bool isTaskInventory) |
1131 | { | 1141 | { |
1132 | 1142 | ||
1133 | } | 1143 | } |
@@ -1421,6 +1431,11 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server | |||
1421 | 1431 | ||
1422 | } | 1432 | } |
1423 | 1433 | ||
1434 | public void SetAgentThrottleSilent(int throttle, int setting) | ||
1435 | { | ||
1436 | |||
1437 | |||
1438 | } | ||
1424 | public byte[] GetThrottlesPacked(float multiplier) | 1439 | public byte[] GetThrottlesPacked(float multiplier) |
1425 | { | 1440 | { |
1426 | return new byte[0]; | 1441 | 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 5a5a70c..2b33084 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 b4fae9d..b05482e 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 d09d3ad..d2a6828 100644 --- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs +++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs | |||
@@ -952,7 +952,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
952 | msg.toAgentID = agentID.Guid; | 952 | msg.toAgentID = agentID.Guid; |
953 | msg.dialog = dialog; | 953 | msg.dialog = dialog; |
954 | msg.fromGroup = true; | 954 | msg.fromGroup = true; |
955 | msg.offline = (byte)0; | 955 | msg.offline = (byte)1; // Allow this message to be stored for offline use |
956 | msg.ParentEstateID = 0; | 956 | msg.ParentEstateID = 0; |
957 | msg.Position = Vector3.Zero; | 957 | msg.Position = Vector3.Zero; |
958 | msg.RegionID = UUID.Zero.Guid; | 958 | 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 | |||
28 | using System; | ||
29 | using System.IO; | ||
30 | using System.Reflection; | ||
31 | using System.Text; | ||
32 | using System.Collections.Generic; | ||
33 | using OpenMetaverse; | ||
34 | using OpenMetaverse.StructuredData; | ||
35 | using OpenSim; | ||
36 | using OpenSim.Region; | ||
37 | using OpenSim.Region.Framework; | ||
38 | using OpenSim.Region.Framework.Scenes; | ||
39 | using OpenSim.Region.Framework.Interfaces; | ||
40 | using OpenSim.Framework; | ||
41 | using OpenSim.Framework.Servers; | ||
42 | using OpenSim.Framework.Servers.HttpServer; | ||
43 | using Nini.Config; | ||
44 | using log4net; | ||
45 | using Mono.Addins; | ||
46 | using Caps = OpenSim.Framework.Capabilities.Caps; | ||
47 | using OSDMap = OpenMetaverse.StructuredData.OSDMap; | ||
48 | |||
49 | namespace 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 6e0a80a..3b3b300 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 | ||
28 | using System; | 7 | using System; |
29 | using System.IO; | 8 | using 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..bcb21d0 100644 --- a/OpenSim/Region/OptionalModules/World/MoneyModule/SampleMoneyModule.cs +++ b/OpenSim/Region/OptionalModules/World/MoneyModule/SampleMoneyModule.cs | |||
@@ -203,8 +203,9 @@ 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, out string result) |
207 | { | 207 | { |
208 | result = String.Empty; | ||
208 | string description = String.Format("Object {0} pays {1}", resolveObjectName(objectID), resolveAgentName(toID)); | 209 | string description = String.Format("Object {0} pays {1}", resolveObjectName(objectID), resolveAgentName(toID)); |
209 | 210 | ||
210 | bool give_result = doMoneyTransfer(fromID, toID, amount, 2, description); | 211 | bool give_result = doMoneyTransfer(fromID, toID, amount, 2, description); |
@@ -840,6 +841,10 @@ namespace OpenSim.Region.OptionalModules.World.MoneyModule | |||
840 | if (module != null) | 841 | if (module != null) |
841 | module.BuyObject(remoteClient, categoryID, localID, saleType, salePrice); | 842 | module.BuyObject(remoteClient, categoryID, localID, saleType, salePrice); |
842 | } | 843 | } |
844 | |||
845 | public void MoveMoney(UUID fromAgentID, UUID toAgentID, int amount, string text) | ||
846 | { | ||
847 | } | ||
843 | } | 848 | } |
844 | 849 | ||
845 | public enum TransactionType : int | 850 | public enum TransactionType : int |
diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs index a895ee1..c88ccc5 100644 --- a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs +++ b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs | |||
@@ -61,7 +61,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC | |||
61 | private readonly string m_firstname; | 61 | private readonly string m_firstname; |
62 | private readonly string m_lastname; | 62 | private readonly string m_lastname; |
63 | private readonly Vector3 m_startPos; | 63 | private readonly Vector3 m_startPos; |
64 | private readonly UUID m_uuid = UUID.Random(); | 64 | private UUID m_uuid = UUID.Random(); |
65 | private readonly Scene m_scene; | 65 | private readonly Scene m_scene; |
66 | private readonly UUID m_ownerID; | 66 | private readonly UUID m_ownerID; |
67 | 67 | ||
@@ -235,7 +235,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC | |||
235 | #pragma warning disable 67 | 235 | #pragma warning disable 67 |
236 | public event Action<IClientAPI> OnLogout; | 236 | public event Action<IClientAPI> OnLogout; |
237 | public event ObjectPermissions OnObjectPermissions; | 237 | public event ObjectPermissions OnObjectPermissions; |
238 | 238 | public event MoveItemsAndLeaveCopy OnMoveItemsAndLeaveCopy; | |
239 | public event MoneyTransferRequest OnMoneyTransferRequest; | 239 | public event MoneyTransferRequest OnMoneyTransferRequest; |
240 | public event ParcelBuy OnParcelBuy; | 240 | public event ParcelBuy OnParcelBuy; |
241 | public event Action<IClientAPI> OnConnectionClosed; | 241 | public event Action<IClientAPI> OnConnectionClosed; |
@@ -255,6 +255,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC | |||
255 | public event ObjectDrop OnObjectDrop; | 255 | public event ObjectDrop OnObjectDrop; |
256 | public event StartAnim OnStartAnim; | 256 | public event StartAnim OnStartAnim; |
257 | public event StopAnim OnStopAnim; | 257 | public event StopAnim OnStopAnim; |
258 | public event ChangeAnim OnChangeAnim; | ||
258 | public event LinkObjects OnLinkObjects; | 259 | public event LinkObjects OnLinkObjects; |
259 | public event DelinkObjects OnDelinkObjects; | 260 | public event DelinkObjects OnDelinkObjects; |
260 | public event RequestMapBlocks OnRequestMapBlocks; | 261 | public event RequestMapBlocks OnRequestMapBlocks; |
@@ -305,6 +306,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC | |||
305 | public event UpdatePrimTexture OnUpdatePrimTexture; | 306 | public event UpdatePrimTexture OnUpdatePrimTexture; |
306 | public event UpdateVector OnUpdatePrimGroupPosition; | 307 | public event UpdateVector OnUpdatePrimGroupPosition; |
307 | public event UpdateVector OnUpdatePrimSinglePosition; | 308 | public event UpdateVector OnUpdatePrimSinglePosition; |
309 | public event ClientChangeObject onClientChangeObject; | ||
308 | public event UpdatePrimRotation OnUpdatePrimGroupRotation; | 310 | public event UpdatePrimRotation OnUpdatePrimGroupRotation; |
309 | public event UpdatePrimSingleRotationPosition OnUpdatePrimSingleRotationPosition; | 311 | public event UpdatePrimSingleRotationPosition OnUpdatePrimSingleRotationPosition; |
310 | public event UpdatePrimSingleRotation OnUpdatePrimSingleRotation; | 312 | public event UpdatePrimSingleRotation OnUpdatePrimSingleRotation; |
@@ -443,7 +445,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC | |||
443 | public event ClassifiedInfoRequest OnClassifiedInfoRequest; | 445 | public event ClassifiedInfoRequest OnClassifiedInfoRequest; |
444 | public event ClassifiedInfoUpdate OnClassifiedInfoUpdate; | 446 | public event ClassifiedInfoUpdate OnClassifiedInfoUpdate; |
445 | public event ClassifiedDelete OnClassifiedDelete; | 447 | public event ClassifiedDelete OnClassifiedDelete; |
446 | public event ClassifiedDelete OnClassifiedGodDelete; | 448 | public event ClassifiedGodDelete OnClassifiedGodDelete; |
447 | 449 | ||
448 | public event EventNotificationAddRequest OnEventNotificationAddRequest; | 450 | public event EventNotificationAddRequest OnEventNotificationAddRequest; |
449 | public event EventNotificationRemoveRequest OnEventNotificationRemoveRequest; | 451 | public event EventNotificationRemoveRequest OnEventNotificationRemoveRequest; |
@@ -482,11 +484,12 @@ namespace OpenSim.Region.OptionalModules.World.NPC | |||
482 | public event GroupVoteHistoryRequest OnGroupVoteHistoryRequest; | 484 | public event GroupVoteHistoryRequest OnGroupVoteHistoryRequest; |
483 | public event SimWideDeletesDelegate OnSimWideDeletes; | 485 | public event SimWideDeletesDelegate OnSimWideDeletes; |
484 | public event SendPostcard OnSendPostcard; | 486 | public event SendPostcard OnSendPostcard; |
487 | public event ChangeInventoryItemFlags OnChangeInventoryItemFlags; | ||
485 | public event MuteListEntryUpdate OnUpdateMuteListEntry; | 488 | public event MuteListEntryUpdate OnUpdateMuteListEntry; |
486 | public event MuteListEntryRemove OnRemoveMuteListEntry; | 489 | public event MuteListEntryRemove OnRemoveMuteListEntry; |
487 | public event GodlikeMessage onGodlikeMessage; | 490 | public event GodlikeMessage onGodlikeMessage; |
488 | public event GodUpdateRegionInfoUpdate OnGodUpdateRegionInfoUpdate; | 491 | public event GodUpdateRegionInfoUpdate OnGodUpdateRegionInfoUpdate; |
489 | 492 | public event GenericCall2 OnUpdateThrottles; | |
490 | #pragma warning restore 67 | 493 | #pragma warning restore 67 |
491 | 494 | ||
492 | #endregion | 495 | #endregion |
@@ -509,6 +512,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC | |||
509 | public virtual UUID AgentId | 512 | public virtual UUID AgentId |
510 | { | 513 | { |
511 | get { return m_uuid; } | 514 | get { return m_uuid; } |
515 | set { m_uuid = value; } | ||
512 | } | 516 | } |
513 | 517 | ||
514 | public UUID SessionId | 518 | public UUID SessionId |
@@ -614,6 +618,12 @@ namespace OpenSim.Region.OptionalModules.World.NPC | |||
614 | public virtual void SetChildAgentThrottle(byte[] throttle) | 618 | public virtual void SetChildAgentThrottle(byte[] throttle) |
615 | { | 619 | { |
616 | } | 620 | } |
621 | |||
622 | public void SetAgentThrottleSilent(int throttle, int setting) | ||
623 | { | ||
624 | |||
625 | |||
626 | } | ||
617 | public byte[] GetThrottlesPacked(float multiplier) | 627 | public byte[] GetThrottlesPacked(float multiplier) |
618 | { | 628 | { |
619 | return new byte[0]; | 629 | return new byte[0]; |
@@ -759,6 +769,10 @@ namespace OpenSim.Region.OptionalModules.World.NPC | |||
759 | { | 769 | { |
760 | } | 770 | } |
761 | 771 | ||
772 | public void SendInventoryItemCreateUpdate(InventoryItemBase Item, UUID transactionID, uint callbackId) | ||
773 | { | ||
774 | } | ||
775 | |||
762 | public virtual void SendRemoveInventoryItem(UUID itemID) | 776 | public virtual void SendRemoveInventoryItem(UUID itemID) |
763 | { | 777 | { |
764 | } | 778 | } |
@@ -775,7 +789,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC | |||
775 | { | 789 | { |
776 | } | 790 | } |
777 | 791 | ||
778 | public virtual void SendXferPacket(ulong xferID, uint packet, byte[] data) | 792 | public virtual void SendXferPacket(ulong xferID, uint packet, byte[] data, bool isTaskInventory) |
779 | { | 793 | { |
780 | } | 794 | } |
781 | public virtual void SendAbortXferPacket(ulong xferID) | 795 | public virtual void SendAbortXferPacket(ulong xferID) |
@@ -920,10 +934,10 @@ namespace OpenSim.Region.OptionalModules.World.NPC | |||
920 | 934 | ||
921 | public void Close() | 935 | public void Close() |
922 | { | 936 | { |
923 | Close(false); | 937 | Close(true, false); |
924 | } | 938 | } |
925 | 939 | ||
926 | public void Close(bool force) | 940 | public void Close(bool sendStop, bool force) |
927 | { | 941 | { |
928 | // Remove ourselves from the scene | 942 | // Remove ourselves from the scene |
929 | m_scene.RemoveClient(AgentId, false); | 943 | m_scene.RemoveClient(AgentId, false); |
diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs index fffe1ab..9ec4740 100644 --- a/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs +++ b/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs | |||
@@ -145,10 +145,9 @@ namespace OpenSim.Region.OptionalModules.World.NPC | |||
145 | npcAvatar.CircuitCode = (uint)Util.RandomClass.Next(0, | 145 | npcAvatar.CircuitCode = (uint)Util.RandomClass.Next(0, |
146 | int.MaxValue); | 146 | int.MaxValue); |
147 | 147 | ||
148 | m_log.DebugFormat( | 148 | // m_log.DebugFormat( |
149 | "[NPC MODULE]: Creating NPC {0} {1} {2}, owner={3}, senseAsAgent={4} at {5} in {6}", | 149 | // "[NPC MODULE]: Creating NPC {0} {1} {2}, owner={3}, senseAsAgent={4} at {5} in {6}", |
150 | firstname, lastname, npcAvatar.AgentId, owner, | 150 | // firstname, lastname, npcAvatar.AgentId, owner, senseAsAgent, position, scene.RegionInfo.RegionName); |
151 | senseAsAgent, position, scene.RegionInfo.RegionName); | ||
152 | 151 | ||
153 | AgentCircuitData acd = new AgentCircuitData(); | 152 | AgentCircuitData acd = new AgentCircuitData(); |
154 | acd.AgentID = npcAvatar.AgentId; | 153 | acd.AgentID = npcAvatar.AgentId; |
@@ -171,36 +170,30 @@ namespace OpenSim.Region.OptionalModules.World.NPC | |||
171 | } | 170 | } |
172 | */ | 171 | */ |
173 | 172 | ||
174 | lock (m_avatars) | 173 | ManualResetEvent ev = new ManualResetEvent(false); |
175 | { | ||
176 | scene.AuthenticateHandler.AddNewCircuit(npcAvatar.CircuitCode, | ||
177 | acd); | ||
178 | scene.AddNewAgent(npcAvatar, PresenceType.Npc); | ||
179 | 174 | ||
180 | ScenePresence sp; | 175 | Util.FireAndForget(delegate(object x) { |
181 | if (scene.TryGetScenePresence(npcAvatar.AgentId, out sp)) | 176 | lock (m_avatars) |
182 | { | 177 | { |
183 | /* | 178 | scene.AuthenticateHandler.AddNewCircuit(npcAvatar.CircuitCode, acd); |
184 | m_log.DebugFormat( | 179 | scene.AddNewAgent(npcAvatar, PresenceType.Npc); |
185 | "[NPC MODULE]: Successfully retrieved scene presence for NPC {0} {1}", | ||
186 | sp.Name, sp.UUID); | ||
187 | */ | ||
188 | |||
189 | sp.CompleteMovement(npcAvatar, false); | ||
190 | m_avatars.Add(npcAvatar.AgentId, npcAvatar); | ||
191 | m_log.DebugFormat("[NPC MODULE]: Created NPC {0} {1}", npcAvatar.AgentId, sp.Name); | ||
192 | 180 | ||
193 | return npcAvatar.AgentId; | 181 | ScenePresence sp; |
182 | if (scene.TryGetScenePresence(npcAvatar.AgentId, out sp)) | ||
183 | { | ||
184 | sp.CompleteMovement(npcAvatar, false); | ||
185 | m_avatars.Add(npcAvatar.AgentId, npcAvatar); | ||
186 | // m_log.DebugFormat("[NPC MODULE]: Created NPC {0} {1}", npcAvatar.AgentId, sp.Name); | ||
187 | } | ||
194 | } | 188 | } |
195 | else | 189 | ev.Set(); |
196 | { | 190 | }); |
197 | m_log.WarnFormat( | ||
198 | "[NPC MODULE]: Could not find scene presence for NPC {0} {1}", | ||
199 | sp.Name, sp.UUID); | ||
200 | 191 | ||
201 | return UUID.Zero; | 192 | ev.WaitOne(); |
202 | } | 193 | |
203 | } | 194 | // m_log.DebugFormat("[NPC MODULE]: Created NPC with id {0}", npcAvatar.AgentId); |
195 | |||
196 | return npcAvatar.AgentId; | ||
204 | } | 197 | } |
205 | 198 | ||
206 | public bool MoveToTarget(UUID agentID, Scene scene, Vector3 pos, | 199 | public bool MoveToTarget(UUID agentID, Scene scene, Vector3 pos, |
@@ -408,9 +401,15 @@ namespace OpenSim.Region.OptionalModules.World.NPC | |||
408 | { | 401 | { |
409 | NPCAvatar av; | 402 | NPCAvatar av; |
410 | if (m_avatars.TryGetValue(npcID, out av)) | 403 | if (m_avatars.TryGetValue(npcID, out av)) |
404 | { | ||
405 | if (npcID == callerID) | ||
406 | return true; | ||
411 | return CheckPermissions(av, callerID); | 407 | return CheckPermissions(av, callerID); |
408 | } | ||
412 | else | 409 | else |
410 | { | ||
413 | return false; | 411 | return false; |
412 | } | ||
414 | } | 413 | } |
415 | } | 414 | } |
416 | 415 | ||
@@ -422,8 +421,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC | |||
422 | /// <returns>true if they do, false if they don't.</returns> | 421 | /// <returns>true if they do, false if they don't.</returns> |
423 | private bool CheckPermissions(NPCAvatar av, UUID callerID) | 422 | private bool CheckPermissions(NPCAvatar av, UUID callerID) |
424 | { | 423 | { |
425 | return callerID == UUID.Zero || av.OwnerID == UUID.Zero || | 424 | return callerID == UUID.Zero || av.OwnerID == UUID.Zero || av.OwnerID == callerID || av.AgentId == callerID; |
426 | av.OwnerID == callerID; | ||
427 | } | 425 | } |
428 | } | 426 | } |
429 | } \ No newline at end of file | 427 | } |
diff --git a/OpenSim/Region/OptionalModules/World/NPC/Tests/NPCModuleTests.cs b/OpenSim/Region/OptionalModules/World/NPC/Tests/NPCModuleTests.cs index 7f9e440..14eb25b 100644 --- a/OpenSim/Region/OptionalModules/World/NPC/Tests/NPCModuleTests.cs +++ b/OpenSim/Region/OptionalModules/World/NPC/Tests/NPCModuleTests.cs | |||
@@ -110,8 +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 | /* | 113 | m_afMod.SetAppearance(sp, originalTe, null, new WearableCacheItem[0] ); |
114 | m_afMod.SetAppearance(sp, originalTe, null); | ||
115 | 114 | ||
116 | 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); |
117 | 116 | ||
@@ -126,7 +125,6 @@ namespace OpenSim.Region.OptionalModules.World.NPC.Tests | |||
126 | 125 | ||
127 | // Have to account for both SP and NPC. | 126 | // Have to account for both SP and NPC. |
128 | Assert.That(m_scene.AuthenticateHandler.GetAgentCircuits().Count, Is.EqualTo(2)); | 127 | Assert.That(m_scene.AuthenticateHandler.GetAgentCircuits().Count, Is.EqualTo(2)); |
129 | */ | ||
130 | } | 128 | } |
131 | 129 | ||
132 | [Test] | 130 | [Test] |