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.cs47
-rw-r--r--OpenSim/Region/OptionalModules/Avatar/Animations/AnimationsCommandModule.cs3
-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.cs82
-rw-r--r--OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs33
-rw-r--r--OpenSim/Region/OptionalModules/PrimLimitsModule/PrimLimitsModule.cs39
-rw-r--r--OpenSim/Region/OptionalModules/Scripting/XmlRpcRouterModule/XmlRpcGridRouterModule.cs2
-rw-r--r--OpenSim/Region/OptionalModules/Scripting/XmlRpcRouterModule/XmlRpcRouterModule.cs5
-rw-r--r--OpenSim/Region/OptionalModules/ViewerSupport/DynamicMenuModule.cs38
-rw-r--r--OpenSim/Region/OptionalModules/World/MoneyModule/SampleMoneyModule.cs7
-rw-r--r--OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs53
-rw-r--r--OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs62
-rw-r--r--OpenSim/Region/OptionalModules/World/NPC/Tests/NPCModuleTests.cs4
-rw-r--r--OpenSim/Region/OptionalModules/World/SceneCommands/SceneCommandsModule.cs2
16 files changed, 262 insertions, 125 deletions
diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs
index 6fe86b2..a34f6ee 100644
--- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs
+++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs
@@ -58,6 +58,8 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server
58 58
59 public ISceneAgent SceneAgent { get; set; } 59 public ISceneAgent SceneAgent { get; set; }
60 60
61 public int PingTimeMS { get { return 0; } }
62
61 private string m_username; 63 private string m_username;
62 private string m_nick; 64 private string m_nick;
63 65
@@ -66,6 +68,8 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server
66 68
67 private bool m_connected = true; 69 private bool m_connected = true;
68 70
71 public List<uint> SelectedObjects {get; private set;}
72
69 public IRCClientView(TcpClient client, Scene scene) 73 public IRCClientView(TcpClient client, Scene scene)
70 { 74 {
71 m_client = client; 75 m_client = client;
@@ -671,6 +675,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server
671 public event ObjectDrop OnObjectDrop; 675 public event ObjectDrop OnObjectDrop;
672 public event StartAnim OnStartAnim; 676 public event StartAnim OnStartAnim;
673 public event StopAnim OnStopAnim; 677 public event StopAnim OnStopAnim;
678 public event ChangeAnim OnChangeAnim;
674 public event LinkObjects OnLinkObjects; 679 public event LinkObjects OnLinkObjects;
675 public event DelinkObjects OnDelinkObjects; 680 public event DelinkObjects OnDelinkObjects;
676 public event RequestMapBlocks OnRequestMapBlocks; 681 public event RequestMapBlocks OnRequestMapBlocks;
@@ -717,6 +722,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server
717 public event RequestObjectPropertiesFamily OnRequestObjectPropertiesFamily; 722 public event RequestObjectPropertiesFamily OnRequestObjectPropertiesFamily;
718 public event UpdatePrimFlags OnUpdatePrimFlags; 723 public event UpdatePrimFlags OnUpdatePrimFlags;
719 public event UpdatePrimTexture OnUpdatePrimTexture; 724 public event UpdatePrimTexture OnUpdatePrimTexture;
725 public event ClientChangeObject onClientChangeObject;
720 public event UpdateVector OnUpdatePrimGroupPosition; 726 public event UpdateVector OnUpdatePrimGroupPosition;
721 public event UpdateVector OnUpdatePrimSinglePosition; 727 public event UpdateVector OnUpdatePrimSinglePosition;
722 public event UpdatePrimRotation OnUpdatePrimGroupRotation; 728 public event UpdatePrimRotation OnUpdatePrimGroupRotation;
@@ -821,6 +827,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server
821 public event ObjectOwner OnObjectOwner; 827 public event ObjectOwner OnObjectOwner;
822 public event DirPlacesQuery OnDirPlacesQuery; 828 public event DirPlacesQuery OnDirPlacesQuery;
823 public event DirFindQuery OnDirFindQuery; 829 public event DirFindQuery OnDirFindQuery;
830 public event MoveItemsAndLeaveCopy OnMoveItemsAndLeaveCopy;
824 public event DirLandQuery OnDirLandQuery; 831 public event DirLandQuery OnDirLandQuery;
825 public event DirPopularQuery OnDirPopularQuery; 832 public event DirPopularQuery OnDirPopularQuery;
826 public event DirClassifiedQuery OnDirClassifiedQuery; 833 public event DirClassifiedQuery OnDirClassifiedQuery;
@@ -837,7 +844,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server
837 public event ClassifiedInfoRequest OnClassifiedInfoRequest; 844 public event ClassifiedInfoRequest OnClassifiedInfoRequest;
838 public event ClassifiedInfoUpdate OnClassifiedInfoUpdate; 845 public event ClassifiedInfoUpdate OnClassifiedInfoUpdate;
839 public event ClassifiedDelete OnClassifiedDelete; 846 public event ClassifiedDelete OnClassifiedDelete;
840 public event ClassifiedDelete OnClassifiedGodDelete; 847 public event ClassifiedGodDelete OnClassifiedGodDelete;
841 public event EventNotificationAddRequest OnEventNotificationAddRequest; 848 public event EventNotificationAddRequest OnEventNotificationAddRequest;
842 public event EventNotificationRemoveRequest OnEventNotificationRemoveRequest; 849 public event EventNotificationRemoveRequest OnEventNotificationRemoveRequest;
843 public event EventGodDelete OnEventGodDelete; 850 public event EventGodDelete OnEventGodDelete;
@@ -867,10 +874,12 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server
867 public event GroupVoteHistoryRequest OnGroupVoteHistoryRequest; 874 public event GroupVoteHistoryRequest OnGroupVoteHistoryRequest;
868 public event SimWideDeletesDelegate OnSimWideDeletes; 875 public event SimWideDeletesDelegate OnSimWideDeletes;
869 public event SendPostcard OnSendPostcard; 876 public event SendPostcard OnSendPostcard;
877 public event ChangeInventoryItemFlags OnChangeInventoryItemFlags;
870 public event MuteListEntryUpdate OnUpdateMuteListEntry; 878 public event MuteListEntryUpdate OnUpdateMuteListEntry;
871 public event MuteListEntryRemove OnRemoveMuteListEntry; 879 public event MuteListEntryRemove OnRemoveMuteListEntry;
872 public event GodlikeMessage onGodlikeMessage; 880 public event GodlikeMessage onGodlikeMessage;
873 public event GodUpdateRegionInfoUpdate OnGodUpdateRegionInfoUpdate; 881 public event GodUpdateRegionInfoUpdate OnGodUpdateRegionInfoUpdate;
882 public event GenericCall2 OnUpdateThrottles;
874 883
875#pragma warning restore 67 884#pragma warning restore 67
876 885
@@ -888,10 +897,10 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server
888 897
889 public void Close() 898 public void Close()
890 { 899 {
891 Close(false); 900 Close(true, false);
892 } 901 }
893 902
894 public void Close(bool force) 903 public void Close(bool sendStop, bool force)
895 { 904 {
896 Disconnect(); 905 Disconnect();
897 } 906 }
@@ -988,6 +997,11 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server
988 997
989 } 998 }
990 999
1000 public virtual bool CanSendLayerData()
1001 {
1002 return false;
1003 }
1004
991 public void SendLayerData(float[] map) 1005 public void SendLayerData(float[] map)
992 { 1006 {
993 1007
@@ -1104,7 +1118,12 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server
1104 1118
1105 public void SendInventoryItemCreateUpdate(InventoryItemBase Item, uint callbackId) 1119 public void SendInventoryItemCreateUpdate(InventoryItemBase Item, uint callbackId)
1106 { 1120 {
1107 1121
1122 }
1123
1124 public void SendInventoryItemCreateUpdate(InventoryItemBase Item, UUID transactionID, uint callbackId)
1125 {
1126
1108 } 1127 }
1109 1128
1110 public void SendRemoveInventoryItem(UUID itemID) 1129 public void SendRemoveInventoryItem(UUID itemID)
@@ -1127,7 +1146,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server
1127 1146
1128 } 1147 }
1129 1148
1130 public void SendXferPacket(ulong xferID, uint packet, byte[] data) 1149 public void SendXferPacket(ulong xferID, uint packet, byte[] data, bool isTaskInventory)
1131 { 1150 {
1132 1151
1133 } 1152 }
@@ -1421,6 +1440,16 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server
1421 1440
1422 } 1441 }
1423 1442
1443 public virtual void SetChildAgentThrottle(byte[] throttle,float factor)
1444 {
1445
1446 }
1447
1448 public void SetAgentThrottleSilent(int throttle, int setting)
1449 {
1450
1451
1452 }
1424 public byte[] GetThrottlesPacked(float multiplier) 1453 public byte[] GetThrottlesPacked(float multiplier)
1425 { 1454 {
1426 return new byte[0]; 1455 return new byte[0];
@@ -1687,5 +1716,13 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server
1687 { 1716 {
1688 } 1717 }
1689 1718
1719 public void SendPartFullUpdate(ISceneEntity ent, uint? parentID)
1720 {
1721 }
1722
1723 public int GetAgentThrottleSilent(int throttle)
1724 {
1725 return 0;
1726 }
1690 } 1727 }
1691} 1728}
diff --git a/OpenSim/Region/OptionalModules/Avatar/Animations/AnimationsCommandModule.cs b/OpenSim/Region/OptionalModules/Avatar/Animations/AnimationsCommandModule.cs
index 84211a9..5c45e4d 100644
--- a/OpenSim/Region/OptionalModules/Avatar/Animations/AnimationsCommandModule.cs
+++ b/OpenSim/Region/OptionalModules/Avatar/Animations/AnimationsCommandModule.cs
@@ -42,6 +42,7 @@ using OpenSim.Region.Framework.Interfaces;
42using OpenSim.Region.Framework.Scenes; 42using OpenSim.Region.Framework.Scenes;
43using OpenSim.Region.Framework.Scenes.Animation; 43using OpenSim.Region.Framework.Scenes.Animation;
44using OpenSim.Services.Interfaces; 44using OpenSim.Services.Interfaces;
45using AnimationSet = OpenSim.Region.Framework.Scenes.Animation.AnimationSet;
45 46
46namespace OpenSim.Region.OptionalModules.Avatar.Animations 47namespace OpenSim.Region.OptionalModules.Avatar.Animations
47{ 48{
@@ -197,4 +198,4 @@ namespace OpenSim.Region.OptionalModules.Avatar.Animations
197 sb.Append("\n"); 198 sb.Append("\n");
198 } 199 }
199 } 200 }
200} \ No newline at end of file 201}
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 45af212..3db0781 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 dd44564..f51527e 100644
--- a/OpenSim/Region/OptionalModules/Avatar/Voice/VivoxVoice/VivoxVoiceModule.cs
+++ b/OpenSim/Region/OptionalModules/Avatar/Voice/VivoxVoice/VivoxVoiceModule.cs
@@ -121,6 +121,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
121 121
122 public void Initialise(IConfigSource config) 122 public void Initialise(IConfigSource config)
123 { 123 {
124 MainConsole.Instance.Commands.AddCommand("vivox", false, "vivox debug", "vivox debug <on>|<off>", "Set vivox debugging", HandleDebug);
124 125
125 m_config = config.Configs["VivoxVoice"]; 126 m_config = config.Configs["VivoxVoice"];
126 127
@@ -196,7 +197,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
196 break; 197 break;
197 } 198 }
198 199
199 m_vivoxVoiceAccountApi = String.Format("http://{0}/api2", m_vivoxServer); 200 m_vivoxVoiceAccountApi = String.Format("https://{0}/api2", m_vivoxServer);
200 201
201 // Admin interface required values 202 // Admin interface required values
202 if (String.IsNullOrEmpty(m_vivoxServer) || 203 if (String.IsNullOrEmpty(m_vivoxServer) ||
@@ -475,8 +476,8 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
475 avatarName = avatar.Name; 476 avatarName = avatar.Name;
476 477
477 m_log.DebugFormat("[VivoxVoice][PROVISIONVOICE]: scene = {0}, agentID = {1}", scene, agentID); 478 m_log.DebugFormat("[VivoxVoice][PROVISIONVOICE]: scene = {0}, agentID = {1}", scene, agentID);
478 m_log.DebugFormat("[VivoxVoice][PROVISIONVOICE]: request: {0}, path: {1}, param: {2}", 479// m_log.DebugFormat("[VivoxVoice][PROVISIONVOICE]: request: {0}, path: {1}, param: {2}",
479 request, path, param); 480// request, path, param);
480 481
481 XmlElement resp; 482 XmlElement resp;
482 bool retry = false; 483 bool retry = false;
@@ -583,7 +584,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
583 584
584 string r = LLSDHelpers.SerialiseLLSDReply(voiceAccountResponse); 585 string r = LLSDHelpers.SerialiseLLSDReply(voiceAccountResponse);
585 586
586 m_log.DebugFormat("[VivoxVoice][PROVISIONVOICE]: avatar \"{0}\": {1}", avatarName, r); 587// m_log.DebugFormat("[VivoxVoice][PROVISIONVOICE]: avatar \"{0}\": {1}", avatarName, r);
587 588
588 return r; 589 return r;
589 } 590 }
@@ -630,24 +631,28 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
630 // voice, if all do retrieve or obtain the parcel 631 // voice, if all do retrieve or obtain the parcel
631 // voice channel 632 // voice channel
632 LandData land = scene.GetLandData(avatar.AbsolutePosition); 633 LandData land = scene.GetLandData(avatar.AbsolutePosition);
634 if (land == null)
635 {
636 return "<llsd><undef /></llsd>";
637 }
633 638
634 m_log.DebugFormat("[VivoxVoice][PARCELVOICE]: region \"{0}\": Parcel \"{1}\" ({2}): avatar \"{3}\": request: {4}, path: {5}, param: {6}", 639// 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); 640// scene.RegionInfo.RegionName, land.Name, land.LocalID, avatarName, request, path, param);
636 // m_log.DebugFormat("[VivoxVoice][PARCELVOICE]: avatar \"{0}\": location: {1} {2} {3}", 641 // m_log.DebugFormat("[VivoxVoice][PARCELVOICE]: avatar \"{0}\": location: {1} {2} {3}",
637 // avatarName, avatar.AbsolutePosition.X, avatar.AbsolutePosition.Y, avatar.AbsolutePosition.Z); 642 // avatarName, avatar.AbsolutePosition.X, avatar.AbsolutePosition.Y, avatar.AbsolutePosition.Z);
638 643
639 // TODO: EstateSettings don't seem to get propagated... 644 // TODO: EstateSettings don't seem to get propagated...
640 if (!scene.RegionInfo.EstateSettings.AllowVoice) 645 if (!scene.RegionInfo.EstateSettings.AllowVoice)
641 { 646 {
642 m_log.DebugFormat("[VivoxVoice][PARCELVOICE]: region \"{0}\": voice not enabled in estate settings", 647 //m_log.DebugFormat("[VivoxVoice][PARCELVOICE]: region \"{0}\": voice not enabled in estate settings",
643 scene.RegionInfo.RegionName); 648 // scene.RegionInfo.RegionName);
644 channel_uri = String.Empty; 649 channel_uri = String.Empty;
645 } 650 }
646 651
647 if ((land.Flags & (uint)ParcelFlags.AllowVoiceChat) == 0) 652 if ((land.Flags & (uint)ParcelFlags.AllowVoiceChat) == 0)
648 { 653 {
649 m_log.DebugFormat("[VivoxVoice][PARCELVOICE]: region \"{0}\": Parcel \"{1}\" ({2}): avatar \"{3}\": voice not enabled for parcel", 654 //m_log.DebugFormat("[VivoxVoice][PARCELVOICE]: region \"{0}\": Parcel \"{1}\" ({2}): avatar \"{3}\": voice not enabled for parcel",
650 scene.RegionInfo.RegionName, land.Name, land.LocalID, avatarName); 655 // scene.RegionInfo.RegionName, land.Name, land.LocalID, avatarName);
651 channel_uri = String.Empty; 656 channel_uri = String.Empty;
652 } 657 }
653 else 658 else
@@ -662,8 +667,8 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
662 parcelVoiceInfo = new LLSDParcelVoiceInfoResponse(scene.RegionInfo.RegionName, land.LocalID, creds); 667 parcelVoiceInfo = new LLSDParcelVoiceInfoResponse(scene.RegionInfo.RegionName, land.LocalID, creds);
663 string r = LLSDHelpers.SerialiseLLSDReply(parcelVoiceInfo); 668 string r = LLSDHelpers.SerialiseLLSDReply(parcelVoiceInfo);
664 669
665 m_log.DebugFormat("[VivoxVoice][PARCELVOICE]: region \"{0}\": Parcel \"{1}\" ({2}): avatar \"{3}\": {4}", 670// m_log.DebugFormat("[VivoxVoice][PARCELVOICE]: region \"{0}\": Parcel \"{1}\" ({2}): avatar \"{3}\": {4}",
666 scene.RegionInfo.RegionName, land.Name, land.LocalID, avatarName, r); 671// scene.RegionInfo.RegionName, land.Name, land.LocalID, avatarName, r);
667 return r; 672 return r;
668 } 673 }
669 catch (Exception e) 674 catch (Exception e)
@@ -690,11 +695,11 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
690 public string ChatSessionRequest(Scene scene, string request, string path, string param, 695 public string ChatSessionRequest(Scene scene, string request, string path, string param,
691 UUID agentID, Caps caps) 696 UUID agentID, Caps caps)
692 { 697 {
693 ScenePresence avatar = scene.GetScenePresence(agentID); 698// ScenePresence avatar = scene.GetScenePresence(agentID);
694 string avatarName = avatar.Name; 699// string avatarName = avatar.Name;
695 700
696 m_log.DebugFormat("[VivoxVoice][CHATSESSION]: avatar \"{0}\": request: {1}, path: {2}, param: {3}", 701// m_log.DebugFormat("[VivoxVoice][CHATSESSION]: avatar \"{0}\": request: {1}, path: {2}, param: {3}",
697 avatarName, request, path, param); 702// avatarName, request, path, param);
698 return "<llsd>true</llsd>"; 703 return "<llsd>true</llsd>";
699 } 704 }
700 705
@@ -744,7 +749,8 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
744 return channelUri; 749 return channelUri;
745 } 750 }
746 751
747 private static readonly string m_vivoxLoginPath = "http://{0}/api2/viv_signin.php?userid={1}&pwd={2}"; 752
753 private static readonly string m_vivoxLoginPath = "https://{0}/api2/viv_signin.php?userid={1}&pwd={2}";
748 754
749 /// <summary> 755 /// <summary>
750 /// Perform administrative login for Vivox. 756 /// Perform administrative login for Vivox.
@@ -756,7 +762,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
756 return VivoxCall(requrl, false); 762 return VivoxCall(requrl, false);
757 } 763 }
758 764
759 private static readonly string m_vivoxLogoutPath = "http://{0}/api2/viv_signout.php?auth_token={1}"; 765 private static readonly string m_vivoxLogoutPath = "https://{0}/api2/viv_signout.php?auth_token={1}";
760 766
761 /// <summary> 767 /// <summary>
762 /// Perform administrative logout for Vivox. 768 /// Perform administrative logout for Vivox.
@@ -767,7 +773,8 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
767 return VivoxCall(requrl, false); 773 return VivoxCall(requrl, false);
768 } 774 }
769 775
770 private static readonly string m_vivoxGetAccountPath = "http://{0}/api2/viv_get_acct.php?auth_token={1}&user_name={2}"; 776
777 private static readonly string m_vivoxGetAccountPath = "https://{0}/api2/viv_get_acct.php?auth_token={1}&user_name={2}";
771 778
772 /// <summary> 779 /// <summary>
773 /// Retrieve account information for the specified user. 780 /// Retrieve account information for the specified user.
@@ -779,7 +786,8 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
779 return VivoxCall(requrl, true); 786 return VivoxCall(requrl, true);
780 } 787 }
781 788
782 private static readonly string m_vivoxNewAccountPath = "http://{0}/api2/viv_adm_acct_new.php?username={1}&pwd={2}&auth_token={3}"; 789
790 private static readonly string m_vivoxNewAccountPath = "https://{0}/api2/viv_adm_acct_new.php?username={1}&pwd={2}&auth_token={3}";
783 791
784 /// <summary> 792 /// <summary>
785 /// Creates a new account. 793 /// Creates a new account.
@@ -793,7 +801,8 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
793 return VivoxCall(requrl, true); 801 return VivoxCall(requrl, true);
794 } 802 }
795 803
796 private static readonly string m_vivoxPasswordPath = "http://{0}/api2/viv_adm_password.php?user_name={1}&new_pwd={2}&auth_token={3}"; 804
805 private static readonly string m_vivoxPasswordPath = "https://{0}/api2/viv_adm_password.php?user_name={1}&new_pwd={2}&auth_token={3}";
797 806
798 /// <summary> 807 /// <summary>
799 /// Change the user's password. 808 /// Change the user's password.
@@ -804,7 +813,8 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
804 return VivoxCall(requrl, true); 813 return VivoxCall(requrl, true);
805 } 814 }
806 815
807 private static readonly string m_vivoxChannelPath = "http://{0}/api2/viv_chan_mod.php?mode={1}&chan_name={2}&auth_token={3}"; 816
817 private static readonly string m_vivoxChannelPath = "https://{0}/api2/viv_chan_mod.php?mode={1}&chan_name={2}&auth_token={3}";
808 818
809 /// <summary> 819 /// <summary>
810 /// Create a channel. 820 /// Create a channel.
@@ -876,7 +886,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
876 return false; 886 return false;
877 } 887 }
878 888
879 private static readonly string m_vivoxChannelSearchPath = "http://{0}/api2/viv_chan_search.php?cond_channame={1}&auth_token={2}"; 889 private static readonly string m_vivoxChannelSearchPath = "https://{0}/api2/viv_chan_search.php?cond_channame={1}&auth_token={2}";
880 890
881 /// <summary> 891 /// <summary>
882 /// Retrieve a channel. 892 /// Retrieve a channel.
@@ -1019,7 +1029,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
1019 return false; 1029 return false;
1020 } 1030 }
1021 1031
1022 // private static readonly string m_vivoxChannelById = "http://{0}/api2/viv_chan_mod.php?mode={1}&chan_id={2}&auth_token={3}"; 1032 // private static readonly string m_vivoxChannelById = "https://{0}/api2/viv_chan_mod.php?mode={1}&chan_id={2}&auth_token={3}";
1023 1033
1024 // private XmlElement VivoxGetChannelById(string parent, string channelid) 1034 // private XmlElement VivoxGetChannelById(string parent, string channelid)
1025 // { 1035 // {
@@ -1031,7 +1041,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
1031 // return VivoxCall(requrl, true); 1041 // return VivoxCall(requrl, true);
1032 // } 1042 // }
1033 1043
1034 private static readonly string m_vivoxChannelDel = "http://{0}/api2/viv_chan_mod.php?mode={1}&chan_id={2}&auth_token={3}"; 1044 private static readonly string m_vivoxChannelDel = "https://{0}/api2/viv_chan_mod.php?mode={1}&chan_id={2}&auth_token={3}";
1035 1045
1036 /// <summary> 1046 /// <summary>
1037 /// Delete a channel. 1047 /// Delete a channel.
@@ -1044,6 +1054,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
1044 /// are required in a later phase. 1054 /// are required in a later phase.
1045 /// In this case the call handles parent and description as optional values. 1055 /// In this case the call handles parent and description as optional values.
1046 /// </summary> 1056 /// </summary>
1057
1047 private XmlElement VivoxDeleteChannel(string parent, string channelid) 1058 private XmlElement VivoxDeleteChannel(string parent, string channelid)
1048 { 1059 {
1049 string requrl = String.Format(m_vivoxChannelDel, m_vivoxServer, "delete", channelid, m_authToken); 1060 string requrl = String.Format(m_vivoxChannelDel, m_vivoxServer, "delete", channelid, m_authToken);
@@ -1054,11 +1065,12 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
1054 return VivoxCall(requrl, true); 1065 return VivoxCall(requrl, true);
1055 } 1066 }
1056 1067
1057 private static readonly string m_vivoxChannelSearch = "http://{0}/api2/viv_chan_search.php?&cond_chanparent={1}&auth_token={2}"; 1068 private static readonly string m_vivoxChannelSearch = "https://{0}/api2/viv_chan_search.php?&cond_chanparent={1}&auth_token={2}";
1058 1069
1059 /// <summary> 1070 /// <summary>
1060 /// Return information on channels in the given directory 1071 /// Return information on channels in the given directory
1061 /// </summary> 1072 /// </summary>
1073
1062 private XmlElement VivoxListChildren(string channelid) 1074 private XmlElement VivoxListChildren(string channelid)
1063 { 1075 {
1064 string requrl = String.Format(m_vivoxChannelSearch, m_vivoxServer, channelid, m_authToken); 1076 string requrl = String.Format(m_vivoxChannelSearch, m_vivoxServer, channelid, m_authToken);
@@ -1124,7 +1136,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
1124 try 1136 try
1125 { 1137 {
1126 // Otherwise prepare the request 1138 // Otherwise prepare the request
1127 m_log.DebugFormat("[VivoxVoice] Sending request <{0}>", requrl); 1139 //m_log.DebugFormat("[VivoxVoice] Sending request <{0}>", requrl);
1128 1140
1129 HttpWebRequest req = (HttpWebRequest)WebRequest.Create(requrl); 1141 HttpWebRequest req = (HttpWebRequest)WebRequest.Create(requrl);
1130 1142
@@ -1324,5 +1336,21 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
1324 result = String.Empty; 1336 result = String.Empty;
1325 return false; 1337 return false;
1326 } 1338 }
1339
1340 private void HandleDebug(string module, string[] cmd)
1341 {
1342 if (cmd.Length < 3)
1343 {
1344 MainConsole.Instance.Output("Error: missing on/off flag");
1345 return;
1346 }
1347
1348 if (cmd[2] == "on")
1349 m_dumpXml = true;
1350 else if (cmd[2] == "off")
1351 m_dumpXml = false;
1352 else
1353 MainConsole.Instance.Output("Error: only on and off are supported");
1354 }
1327 } 1355 }
1328} 1356}
diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs
index dff3f78..0512e48 100644
--- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs
+++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs
@@ -206,6 +206,8 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
206 } 206 }
207 207
208 scene.EventManager.OnNewClient += OnNewClient; 208 scene.EventManager.OnNewClient += OnNewClient;
209 scene.EventManager.OnMakeRootAgent += OnMakeRoot;
210 scene.EventManager.OnMakeChildAgent += OnMakeChild;
209 scene.EventManager.OnIncomingInstantMessage += OnGridInstantMessage; 211 scene.EventManager.OnIncomingInstantMessage += OnGridInstantMessage;
210 // The InstantMessageModule itself doesn't do this, 212 // The InstantMessageModule itself doesn't do this,
211 // so lets see if things explode if we don't do it 213 // so lets see if things explode if we don't do it
@@ -256,19 +258,34 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
256 #endregion 258 #endregion
257 259
258 #region EventHandlers 260 #region EventHandlers
261
262 private void OnMakeRoot(ScenePresence sp)
263 {
264 if (m_debugEnabled) m_log.DebugFormat("[Groups]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name);
265
266 sp.ControllingClient.OnUUIDGroupNameRequest += HandleUUIDGroupNameRequest;
267 // Used for Notices and Group Invites/Accept/Reject
268 sp.ControllingClient.OnInstantMessage += OnInstantMessage;
269 // Send client their groups information.
270// SendAgentGroupDataUpdate(sp.ControllingClient, sp.UUID);
271 // only send data viwer will ask rest later
272 OnAgentDataUpdateRequest(sp.ControllingClient, sp.UUID, sp.UUID);
273 }
274
275 private void OnMakeChild(ScenePresence sp)
276 {
277 if (m_debugEnabled) m_log.DebugFormat("[Groups]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name);
278
279 sp.ControllingClient.OnUUIDGroupNameRequest -= HandleUUIDGroupNameRequest;
280 sp.ControllingClient.OnInstantMessage -= OnInstantMessage;
281 }
282
259 private void OnNewClient(IClientAPI client) 283 private void OnNewClient(IClientAPI client)
260 { 284 {
261 if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); 285 if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name);
262 286
263 client.OnUUIDGroupNameRequest += HandleUUIDGroupNameRequest;
264 client.OnAgentDataUpdateRequest += OnAgentDataUpdateRequest; 287 client.OnAgentDataUpdateRequest += OnAgentDataUpdateRequest;
265 client.OnRequestAvatarProperties += OnRequestAvatarProperties; 288 client.OnRequestAvatarProperties += OnRequestAvatarProperties;
266
267 // Used for Notices and Group Invites/Accept/Reject
268 client.OnInstantMessage += OnInstantMessage;
269
270 // Send client their groups information.
271 SendAgentGroupDataUpdate(client, client.AgentId);
272 } 289 }
273 290
274 private void OnRequestAvatarProperties(IClientAPI remoteClient, UUID avatarID) 291 private void OnRequestAvatarProperties(IClientAPI remoteClient, UUID avatarID)
@@ -984,7 +1001,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
984 msg.toAgentID = agentID.Guid; 1001 msg.toAgentID = agentID.Guid;
985 msg.dialog = dialog; 1002 msg.dialog = dialog;
986 msg.fromGroup = true; 1003 msg.fromGroup = true;
987 msg.offline = (byte)0; 1004 msg.offline = (byte)1; // Allow this message to be stored for offline use
988 msg.ParentEstateID = 0; 1005 msg.ParentEstateID = 0;
989 msg.Position = Vector3.Zero; 1006 msg.Position = Vector3.Zero;
990 msg.RegionID = UUID.Zero.Guid; 1007 msg.RegionID = UUID.Zero.Guid;
diff --git a/OpenSim/Region/OptionalModules/PrimLimitsModule/PrimLimitsModule.cs b/OpenSim/Region/OptionalModules/PrimLimitsModule/PrimLimitsModule.cs
index 395bbf1..d3c46c9 100644
--- a/OpenSim/Region/OptionalModules/PrimLimitsModule/PrimLimitsModule.cs
+++ b/OpenSim/Region/OptionalModules/PrimLimitsModule/PrimLimitsModule.cs
@@ -135,31 +135,50 @@ namespace OpenSim.Region.OptionalModules
135 135
136 private bool CanObjectEnter(UUID objectID, bool enteringRegion, Vector3 newPoint, Scene scene) 136 private bool CanObjectEnter(UUID objectID, bool enteringRegion, Vector3 newPoint, Scene scene)
137 { 137 {
138 if (newPoint.X < -1f || newPoint.X > (scene.RegionInfo.RegionSizeX + 1) ||
139 newPoint.Y < -1f || newPoint.Y > (scene.RegionInfo.RegionSizeY) )
140 return true;
141
138 SceneObjectPart obj = scene.GetSceneObjectPart(objectID); 142 SceneObjectPart obj = scene.GetSceneObjectPart(objectID);
139 Vector3 oldPoint = obj.GroupPosition; 143
140 int objectCount = obj.ParentGroup.PrimCount; 144 if (obj == null)
141 ILandObject oldParcel = scene.LandChannel.GetLandObject(oldPoint.X, oldPoint.Y); 145 return false;
146
147 // Prim counts are determined by the location of the root prim. if we're
148 // moving a child prim, just let it pass
149 if (!obj.IsRoot)
150 {
151 return true;
152 }
153
142 ILandObject newParcel = scene.LandChannel.GetLandObject(newPoint.X, newPoint.Y); 154 ILandObject newParcel = scene.LandChannel.GetLandObject(newPoint.X, newPoint.Y);
143 155
156<<<<<<< HEAD
144 // newParcel will be null only if it outside of our current region. If this is the case, then the 157 // newParcel will be null only if it outside of our current region. If this is the case, then the
145 // receiving permissions will perform the check. 158 // receiving permissions will perform the check.
146 if (newParcel == null) 159 if (newParcel == null)
147 return true; 160 return true;
148 161
149 // The prim hasn't crossed a region boundary so we don't need to worry 162 // The prim hasn't crossed a region boundary so we don't need to worry
150 // about prim counts here 163=======
151 if(oldParcel.Equals(newParcel)) 164 if (newParcel == null)
152 {
153 return true; 165 return true;
154 }
155 166
156 // Prim counts are determined by the location of the root prim. if we're 167 Vector3 oldPoint = obj.GroupPosition;
157 // moving a child prim, just let it pass 168 ILandObject oldParcel = scene.LandChannel.GetLandObject(oldPoint.X, oldPoint.Y);
158 if(!obj.IsRoot) 169
170 // The prim hasn't crossed a region boundry so we don't need to worry
171>>>>>>> avn/ubitvar
172 // about prim counts here
173 if(oldParcel != null && oldParcel.Equals(newParcel))
159 { 174 {
160 return true; 175 return true;
161 } 176 }
162 177
178 int objectCount = obj.ParentGroup.PrimCount;
179 int usedPrims = newParcel.PrimCounts.Total;
180 int simulatorCapacity = newParcel.GetSimulatorMaxPrimCount();
181
163 // TODO: Add Special Case here for temporary prims 182 // TODO: Add Special Case here for temporary prims
164 183
165 string response = DoCommonChecks(objectCount, obj.OwnerID, newParcel, scene); 184 string response = DoCommonChecks(objectCount, obj.OwnerID, newParcel, scene);
diff --git a/OpenSim/Region/OptionalModules/Scripting/XmlRpcRouterModule/XmlRpcGridRouterModule.cs b/OpenSim/Region/OptionalModules/Scripting/XmlRpcRouterModule/XmlRpcGridRouterModule.cs
index 709d389..97133c0 100644
--- a/OpenSim/Region/OptionalModules/Scripting/XmlRpcRouterModule/XmlRpcGridRouterModule.cs
+++ b/OpenSim/Region/OptionalModules/Scripting/XmlRpcRouterModule/XmlRpcGridRouterModule.cs
@@ -179,7 +179,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.XmlRpcGridRouterModule
179 { 179 {
180 if(!m_Channels.ContainsKey(itemID)) 180 if(!m_Channels.ContainsKey(itemID))
181 { 181 {
182 m_log.InfoFormat("[XMLRPC GRID ROUTER]: Attempted to unregister non-existing Item: {0}", itemID.ToString()); 182 //m_log.InfoFormat("[XMLRPC GRID ROUTER]: Attempted to unregister non-existing Item: {0}", itemID.ToString());
183 return false; 183 return false;
184 } 184 }
185 185
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/DynamicMenuModule.cs b/OpenSim/Region/OptionalModules/ViewerSupport/DynamicMenuModule.cs
index d37369c..fcf5e91 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 4cd5676..8565f5a 100644
--- a/OpenSim/Region/OptionalModules/World/MoneyModule/SampleMoneyModule.cs
+++ b/OpenSim/Region/OptionalModules/World/MoneyModule/SampleMoneyModule.cs
@@ -205,8 +205,9 @@ namespace OpenSim.Region.OptionalModules.World.MoneyModule
205 { 205 {
206 } 206 }
207 207
208 public bool ObjectGiveMoney(UUID objectID, UUID fromID, UUID toID, int amount) 208 public bool ObjectGiveMoney(UUID objectID, UUID fromID, UUID toID, int amount, UUID txn, out string result)
209 { 209 {
210 result = String.Empty;
210 string description = String.Format("Object {0} pays {1}", resolveObjectName(objectID), resolveAgentName(toID)); 211 string description = String.Format("Object {0} pays {1}", resolveObjectName(objectID), resolveAgentName(toID));
211 212
212 bool give_result = doMoneyTransfer(fromID, toID, amount, 2, description); 213 bool give_result = doMoneyTransfer(fromID, toID, amount, 2, description);
@@ -842,6 +843,10 @@ namespace OpenSim.Region.OptionalModules.World.MoneyModule
842 if (module != null) 843 if (module != null)
843 module.BuyObject(remoteClient, categoryID, localID, saleType, salePrice); 844 module.BuyObject(remoteClient, categoryID, localID, saleType, salePrice);
844 } 845 }
846
847 public void MoveMoney(UUID fromAgentID, UUID toAgentID, int amount, string text)
848 {
849 }
845 } 850 }
846 851
847 public enum TransactionType : int 852 public enum TransactionType : int
diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs
index fb644b7..dc1ea95 100644
--- a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs
+++ b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs
@@ -61,10 +61,16 @@ 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<<<<<<< HEAD
64 private readonly UUID m_uuid; 65 private readonly UUID m_uuid;
66=======
67 private UUID m_uuid = UUID.Random();
68>>>>>>> avn/ubitvar
65 private readonly Scene m_scene; 69 private readonly Scene m_scene;
66 private readonly UUID m_ownerID; 70 private readonly UUID m_ownerID;
67 71
72 public List<uint> SelectedObjects {get; private set;}
73
68 public NPCAvatar( 74 public NPCAvatar(
69 string firstname, string lastname, Vector3 position, UUID ownerID, bool senseAsAgent, Scene scene) 75 string firstname, string lastname, Vector3 position, UUID ownerID, bool senseAsAgent, Scene scene)
70 { 76 {
@@ -94,6 +100,8 @@ namespace OpenSim.Region.OptionalModules.World.NPC
94 get { return m_scene; } 100 get { return m_scene; }
95 } 101 }
96 102
103 public int PingTimeMS { get { return 0; } }
104
97 public UUID OwnerID 105 public UUID OwnerID
98 { 106 {
99 get { return m_ownerID; } 107 get { return m_ownerID; }
@@ -248,7 +256,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC
248#pragma warning disable 67 256#pragma warning disable 67
249 public event Action<IClientAPI> OnLogout; 257 public event Action<IClientAPI> OnLogout;
250 public event ObjectPermissions OnObjectPermissions; 258 public event ObjectPermissions OnObjectPermissions;
251 259 public event MoveItemsAndLeaveCopy OnMoveItemsAndLeaveCopy;
252 public event MoneyTransferRequest OnMoneyTransferRequest; 260 public event MoneyTransferRequest OnMoneyTransferRequest;
253 public event ParcelBuy OnParcelBuy; 261 public event ParcelBuy OnParcelBuy;
254 public event Action<IClientAPI> OnConnectionClosed; 262 public event Action<IClientAPI> OnConnectionClosed;
@@ -268,6 +276,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC
268 public event ObjectDrop OnObjectDrop; 276 public event ObjectDrop OnObjectDrop;
269 public event StartAnim OnStartAnim; 277 public event StartAnim OnStartAnim;
270 public event StopAnim OnStopAnim; 278 public event StopAnim OnStopAnim;
279 public event ChangeAnim OnChangeAnim;
271 public event LinkObjects OnLinkObjects; 280 public event LinkObjects OnLinkObjects;
272 public event DelinkObjects OnDelinkObjects; 281 public event DelinkObjects OnDelinkObjects;
273 public event RequestMapBlocks OnRequestMapBlocks; 282 public event RequestMapBlocks OnRequestMapBlocks;
@@ -318,6 +327,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC
318 public event UpdatePrimTexture OnUpdatePrimTexture; 327 public event UpdatePrimTexture OnUpdatePrimTexture;
319 public event UpdateVector OnUpdatePrimGroupPosition; 328 public event UpdateVector OnUpdatePrimGroupPosition;
320 public event UpdateVector OnUpdatePrimSinglePosition; 329 public event UpdateVector OnUpdatePrimSinglePosition;
330 public event ClientChangeObject onClientChangeObject;
321 public event UpdatePrimRotation OnUpdatePrimGroupRotation; 331 public event UpdatePrimRotation OnUpdatePrimGroupRotation;
322 public event UpdatePrimSingleRotationPosition OnUpdatePrimSingleRotationPosition; 332 public event UpdatePrimSingleRotationPosition OnUpdatePrimSingleRotationPosition;
323 public event UpdatePrimSingleRotation OnUpdatePrimSingleRotation; 333 public event UpdatePrimSingleRotation OnUpdatePrimSingleRotation;
@@ -456,7 +466,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC
456 public event ClassifiedInfoRequest OnClassifiedInfoRequest; 466 public event ClassifiedInfoRequest OnClassifiedInfoRequest;
457 public event ClassifiedInfoUpdate OnClassifiedInfoUpdate; 467 public event ClassifiedInfoUpdate OnClassifiedInfoUpdate;
458 public event ClassifiedDelete OnClassifiedDelete; 468 public event ClassifiedDelete OnClassifiedDelete;
459 public event ClassifiedDelete OnClassifiedGodDelete; 469 public event ClassifiedGodDelete OnClassifiedGodDelete;
460 470
461 public event EventNotificationAddRequest OnEventNotificationAddRequest; 471 public event EventNotificationAddRequest OnEventNotificationAddRequest;
462 public event EventNotificationRemoveRequest OnEventNotificationRemoveRequest; 472 public event EventNotificationRemoveRequest OnEventNotificationRemoveRequest;
@@ -495,11 +505,12 @@ namespace OpenSim.Region.OptionalModules.World.NPC
495 public event GroupVoteHistoryRequest OnGroupVoteHistoryRequest; 505 public event GroupVoteHistoryRequest OnGroupVoteHistoryRequest;
496 public event SimWideDeletesDelegate OnSimWideDeletes; 506 public event SimWideDeletesDelegate OnSimWideDeletes;
497 public event SendPostcard OnSendPostcard; 507 public event SendPostcard OnSendPostcard;
508 public event ChangeInventoryItemFlags OnChangeInventoryItemFlags;
498 public event MuteListEntryUpdate OnUpdateMuteListEntry; 509 public event MuteListEntryUpdate OnUpdateMuteListEntry;
499 public event MuteListEntryRemove OnRemoveMuteListEntry; 510 public event MuteListEntryRemove OnRemoveMuteListEntry;
500 public event GodlikeMessage onGodlikeMessage; 511 public event GodlikeMessage onGodlikeMessage;
501 public event GodUpdateRegionInfoUpdate OnGodUpdateRegionInfoUpdate; 512 public event GodUpdateRegionInfoUpdate OnGodUpdateRegionInfoUpdate;
502 513 public event GenericCall2 OnUpdateThrottles;
503#pragma warning restore 67 514#pragma warning restore 67
504 515
505 #endregion 516 #endregion
@@ -522,6 +533,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC
522 public virtual UUID AgentId 533 public virtual UUID AgentId
523 { 534 {
524 get { return m_uuid; } 535 get { return m_uuid; }
536 set { m_uuid = value; }
525 } 537 }
526 538
527 public UUID SessionId 539 public UUID SessionId
@@ -627,6 +639,17 @@ namespace OpenSim.Region.OptionalModules.World.NPC
627 public virtual void SetChildAgentThrottle(byte[] throttle) 639 public virtual void SetChildAgentThrottle(byte[] throttle)
628 { 640 {
629 } 641 }
642
643 public virtual void SetChildAgentThrottle(byte[] throttle, float factor)
644 {
645
646 }
647
648 public void SetAgentThrottleSilent(int throttle, int setting)
649 {
650
651
652 }
630 public byte[] GetThrottlesPacked(float multiplier) 653 public byte[] GetThrottlesPacked(float multiplier)
631 { 654 {
632 return new byte[0]; 655 return new byte[0];
@@ -665,6 +688,11 @@ namespace OpenSim.Region.OptionalModules.World.NPC
665 688
666 } 689 }
667 690
691 public virtual bool CanSendLayerData()
692 {
693 return false;
694 }
695
668 public virtual void SendLayerData(float[] map) 696 public virtual void SendLayerData(float[] map)
669 { 697 {
670 } 698 }
@@ -772,6 +800,10 @@ namespace OpenSim.Region.OptionalModules.World.NPC
772 { 800 {
773 } 801 }
774 802
803 public void SendInventoryItemCreateUpdate(InventoryItemBase Item, UUID transactionID, uint callbackId)
804 {
805 }
806
775 public virtual void SendRemoveInventoryItem(UUID itemID) 807 public virtual void SendRemoveInventoryItem(UUID itemID)
776 { 808 {
777 } 809 }
@@ -788,7 +820,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC
788 { 820 {
789 } 821 }
790 822
791 public virtual void SendXferPacket(ulong xferID, uint packet, byte[] data) 823 public virtual void SendXferPacket(ulong xferID, uint packet, byte[] data, bool isTaskInventory)
792 { 824 {
793 } 825 }
794 public virtual void SendAbortXferPacket(ulong xferID) 826 public virtual void SendAbortXferPacket(ulong xferID)
@@ -933,10 +965,10 @@ namespace OpenSim.Region.OptionalModules.World.NPC
933 965
934 public void Close() 966 public void Close()
935 { 967 {
936 Close(false); 968 Close(true, false);
937 } 969 }
938 970
939 public void Close(bool force) 971 public void Close(bool sendStop, bool force)
940 { 972 {
941 // Remove ourselves from the scene 973 // Remove ourselves from the scene
942 m_scene.RemoveClient(AgentId, false); 974 m_scene.RemoveClient(AgentId, false);
@@ -1269,5 +1301,14 @@ namespace OpenSim.Region.OptionalModules.World.NPC
1269 { 1301 {
1270 } 1302 }
1271 1303
1304 public void SendPartFullUpdate(ISceneEntity ent, uint? parentID)
1305 {
1306 }
1307
1308 public int GetAgentThrottleSilent(int throttle)
1309 {
1310 return 0;
1311 }
1312
1272 } 1313 }
1273} 1314}
diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs
index 9232db9..2977195 100644
--- a/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs
+++ b/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs
@@ -167,10 +167,9 @@ namespace OpenSim.Region.OptionalModules.World.NPC
167 npcAvatar.CircuitCode = (uint)Util.RandomClass.Next(0, 167 npcAvatar.CircuitCode = (uint)Util.RandomClass.Next(0,
168 int.MaxValue); 168 int.MaxValue);
169 169
170 m_log.DebugFormat( 170// m_log.DebugFormat(
171 "[NPC MODULE]: Creating NPC {0} {1} {2}, owner={3}, senseAsAgent={4} at {5} in {6}", 171// "[NPC MODULE]: Creating NPC {0} {1} {2}, owner={3}, senseAsAgent={4} at {5} in {6}",
172 firstname, lastname, npcAvatar.AgentId, owner, 172// firstname, lastname, npcAvatar.AgentId, owner, senseAsAgent, position, scene.RegionInfo.RegionName);
173 senseAsAgent, position, scene.RegionInfo.RegionName);
174 173
175 AgentCircuitData acd = new AgentCircuitData(); 174 AgentCircuitData acd = new AgentCircuitData();
176 acd.AgentID = npcAvatar.AgentId; 175 acd.AgentID = npcAvatar.AgentId;
@@ -192,36 +191,31 @@ namespace OpenSim.Region.OptionalModules.World.NPC
192 } 191 }
193 */ 192 */
194 193
195 lock (m_avatars) 194// ManualResetEvent ev = new ManualResetEvent(false);
196 {
197 scene.AuthenticateHandler.AddNewCircuit(npcAvatar.CircuitCode,
198 acd);
199 scene.AddNewAgent(npcAvatar, PresenceType.Npc);
200 195
201 ScenePresence sp; 196// Util.FireAndForget(delegate(object x) {
202 if (scene.TryGetScenePresence(npcAvatar.AgentId, out sp)) 197 lock (m_avatars)
203 { 198 {
204 /* 199 scene.AuthenticateHandler.AddNewCircuit(npcAvatar.CircuitCode, acd);
205 m_log.DebugFormat( 200 scene.AddNewAgent(npcAvatar, PresenceType.Npc);
206 "[NPC MODULE]: Successfully retrieved scene presence for NPC {0} {1}",
207 sp.Name, sp.UUID);
208 */
209 201
210 sp.CompleteMovement(npcAvatar, false); 202 ScenePresence sp;
211 m_avatars.Add(npcAvatar.AgentId, npcAvatar); 203 if (scene.TryGetScenePresence(npcAvatar.AgentId, out sp))
212 m_log.DebugFormat("[NPC MODULE]: Created NPC {0} {1}", npcAvatar.AgentId, sp.Name); 204 {
213 205
214 return npcAvatar.AgentId; 206 sp.CompleteMovement(npcAvatar, false);
207 m_avatars.Add(npcAvatar.AgentId, npcAvatar);
208// m_log.DebugFormat("[NPC MODULE]: Created NPC {0} {1}", npcAvatar.AgentId, sp.Name);
209 }
215 } 210 }
216 else 211// ev.Set();
217 { 212// });
218 m_log.WarnFormat(
219 "[NPC MODULE]: Could not find scene presence for NPC {0} {1}",
220 sp.Name, sp.UUID);
221 213
222 return UUID.Zero; 214// ev.WaitOne();
223 } 215
224 } 216// m_log.DebugFormat("[NPC MODULE]: Created NPC with id {0}", npcAvatar.AgentId);
217
218 return npcAvatar.AgentId;
225 } 219 }
226 220
227 public bool MoveToTarget(UUID agentID, Scene scene, Vector3 pos, 221 public bool MoveToTarget(UUID agentID, Scene scene, Vector3 pos,
@@ -436,9 +430,15 @@ namespace OpenSim.Region.OptionalModules.World.NPC
436 { 430 {
437 NPCAvatar av; 431 NPCAvatar av;
438 if (m_avatars.TryGetValue(npcID, out av)) 432 if (m_avatars.TryGetValue(npcID, out av))
433 {
434 if (npcID == callerID)
435 return true;
439 return CheckPermissions(av, callerID); 436 return CheckPermissions(av, callerID);
437 }
440 else 438 else
439 {
441 return false; 440 return false;
441 }
442 } 442 }
443 } 443 }
444 444
@@ -457,8 +457,12 @@ namespace OpenSim.Region.OptionalModules.World.NPC
457 /// <returns>true if they do, false if they don't.</returns> 457 /// <returns>true if they do, false if they don't.</returns>
458 private bool CheckPermissions(NPCAvatar av, UUID callerID) 458 private bool CheckPermissions(NPCAvatar av, UUID callerID)
459 { 459 {
460<<<<<<< HEAD
460 return callerID == UUID.Zero || av.OwnerID == UUID.Zero || 461 return callerID == UUID.Zero || av.OwnerID == UUID.Zero ||
461 av.OwnerID == callerID || av.AgentId == callerID; 462 av.OwnerID == callerID || av.AgentId == callerID;
463=======
464 return callerID == UUID.Zero || av.OwnerID == UUID.Zero || av.OwnerID == callerID || av.AgentId == callerID;
465>>>>>>> avn/ubitvar
462 } 466 }
463 } 467 }
464} 468}
diff --git a/OpenSim/Region/OptionalModules/World/NPC/Tests/NPCModuleTests.cs b/OpenSim/Region/OptionalModules/World/NPC/Tests/NPCModuleTests.cs
index 0bebb58..2345e38 100644
--- a/OpenSim/Region/OptionalModules/World/NPC/Tests/NPCModuleTests.cs
+++ b/OpenSim/Region/OptionalModules/World/NPC/Tests/NPCModuleTests.cs
@@ -113,7 +113,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC.Tests
113 // ScenePresence.SendInitialData() to reset our entire appearance. 113 // ScenePresence.SendInitialData() to reset our entire appearance.
114 m_scene.AssetService.Store(AssetHelpers.CreateNotecardAsset(originalFace8TextureId)); 114 m_scene.AssetService.Store(AssetHelpers.CreateNotecardAsset(originalFace8TextureId));
115 115
116 m_afMod.SetAppearance(sp, originalTe, null, null); 116 m_afMod.SetAppearance(sp, originalTe, null, new WearableCacheItem[0] );
117 117
118 UUID npcId = m_npcMod.CreateNPC("John", "Smith", new Vector3(128, 128, 30), UUID.Zero, true, m_scene, sp.Appearance); 118 UUID npcId = m_npcMod.CreateNPC("John", "Smith", new Vector3(128, 128, 30), UUID.Zero, true, m_scene, sp.Appearance);
119 119
@@ -484,4 +484,4 @@ namespace OpenSim.Region.OptionalModules.World.NPC.Tests
484 Assert.That(npc.ParentID, Is.EqualTo(0)); 484 Assert.That(npc.ParentID, Is.EqualTo(0));
485 } 485 }
486 } 486 }
487} \ No newline at end of file 487}
diff --git a/OpenSim/Region/OptionalModules/World/SceneCommands/SceneCommandsModule.cs b/OpenSim/Region/OptionalModules/World/SceneCommands/SceneCommandsModule.cs
index 0927c4f..a26d145 100644
--- a/OpenSim/Region/OptionalModules/World/SceneCommands/SceneCommandsModule.cs
+++ b/OpenSim/Region/OptionalModules/World/SceneCommands/SceneCommandsModule.cs
@@ -334,4 +334,4 @@ namespace OpenSim.Region.OptionalModules.Avatar.Attachments
334 } 334 }
335 } 335 }
336 } 336 }
337} \ No newline at end of file 337}