aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--OpenSim/Framework/AssetLandmark.cs3
-rw-r--r--OpenSim/Framework/IClientAPI.cs2
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs5
-rw-r--r--OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs29
-rw-r--r--OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs53
-rw-r--r--OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs15
-rw-r--r--OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs82
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.Inventory.cs74
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs27
-rw-r--r--bin/config-include/GridCommon.ini.example3
-rw-r--r--bin/config-include/StandaloneCommon.ini.example1
11 files changed, 190 insertions, 104 deletions
diff --git a/OpenSim/Framework/AssetLandmark.cs b/OpenSim/Framework/AssetLandmark.cs
index f433235..103f756 100644
--- a/OpenSim/Framework/AssetLandmark.cs
+++ b/OpenSim/Framework/AssetLandmark.cs
@@ -35,6 +35,7 @@ namespace OpenSim.Framework
35 public Vector3 Position; 35 public Vector3 Position;
36 public ulong RegionHandle; 36 public ulong RegionHandle;
37 public UUID RegionID; 37 public UUID RegionID;
38 public string Gatekeeper = string.Empty;
38 public int Version; 39 public int Version;
39 40
40 public AssetLandmark(AssetBase a) 41 public AssetLandmark(AssetBase a)
@@ -51,6 +52,8 @@ namespace OpenSim.Framework
51 string[] parts = temp.Split('\n'); 52 string[] parts = temp.Split('\n');
52 int.TryParse(parts[0].Substring(17, 1), out Version); 53 int.TryParse(parts[0].Substring(17, 1), out Version);
53 UUID.TryParse(parts[1].Substring(10, 36), out RegionID); 54 UUID.TryParse(parts[1].Substring(10, 36), out RegionID);
55 if (parts.Length >= 5)
56 Gatekeeper = parts[4].Replace("gatekeeper ", "");
54 // The position is a vector with spaces as separators ("10.3 32.5 43"). 57 // The position is a vector with spaces as separators ("10.3 32.5 43").
55 // Parse each scalar separately to take into account the system's culture setting. 58 // Parse each scalar separately to take into account the system's culture setting.
56 string[] scalars = parts[2].Substring(10, parts[2].Length - 10).Split(' '); 59 string[] scalars = parts[2].Substring(10, parts[2].Length - 10).Split(' ');
diff --git a/OpenSim/Framework/IClientAPI.cs b/OpenSim/Framework/IClientAPI.cs
index 137f432..659d42f 100644
--- a/OpenSim/Framework/IClientAPI.cs
+++ b/OpenSim/Framework/IClientAPI.cs
@@ -83,7 +83,7 @@ namespace OpenSim.Framework
83 IClientAPI remoteClient, ulong regionHandle, Vector3 position, Vector3 lookAt, uint flags); 83 IClientAPI remoteClient, ulong regionHandle, Vector3 position, Vector3 lookAt, uint flags);
84 84
85 public delegate void TeleportLandmarkRequest( 85 public delegate void TeleportLandmarkRequest(
86 IClientAPI remoteClient, UUID regionID, Vector3 position); 86 IClientAPI remoteClient, AssetLandmark lm);
87 87
88 public delegate void DisconnectUser(); 88 public delegate void DisconnectUser();
89 89
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
index d8fcb62..3a9e4b7 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
@@ -8301,6 +8301,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
8301 AssetLandmark lm; 8301 AssetLandmark lm;
8302 if (lmid != UUID.Zero) 8302 if (lmid != UUID.Zero)
8303 { 8303 {
8304
8304 //AssetBase lma = m_assetCache.GetAsset(lmid, false); 8305 //AssetBase lma = m_assetCache.GetAsset(lmid, false);
8305 AssetBase lma = m_assetService.Get(lmid.ToString()); 8306 AssetBase lma = m_assetService.Get(lmid.ToString());
8306 8307
@@ -8341,13 +8342,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP
8341 TeleportLandmarkRequest handlerTeleportLandmarkRequest = OnTeleportLandmarkRequest; 8342 TeleportLandmarkRequest handlerTeleportLandmarkRequest = OnTeleportLandmarkRequest;
8342 if (handlerTeleportLandmarkRequest != null) 8343 if (handlerTeleportLandmarkRequest != null)
8343 { 8344 {
8344 handlerTeleportLandmarkRequest(this, lm.RegionID, lm.Position); 8345 handlerTeleportLandmarkRequest(this, lm);
8345 } 8346 }
8346 else 8347 else
8347 { 8348 {
8348 //no event handler so cancel request 8349 //no event handler so cancel request
8349
8350
8351 TeleportCancelPacket tpCancel = (TeleportCancelPacket)PacketPool.Instance.GetPacket(PacketType.TeleportCancel); 8350 TeleportCancelPacket tpCancel = (TeleportCancelPacket)PacketPool.Instance.GetPacket(PacketType.TeleportCancel);
8352 tpCancel.Info.AgentID = tpReq.Info.AgentID; 8351 tpCancel.Info.AgentID = tpReq.Info.AgentID;
8353 tpCancel.Info.SessionID = tpReq.Info.SessionID; 8352 tpCancel.Info.SessionID = tpReq.Info.SessionID;
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
index ec084fb..1341533 100644
--- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
@@ -52,6 +52,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
52 52
53 protected bool m_Enabled = false; 53 protected bool m_Enabled = false;
54 protected Scene m_aScene; 54 protected Scene m_aScene;
55 protected List<Scene> m_Scenes = new List<Scene>();
55 protected List<UUID> m_agentsInTransit; 56 protected List<UUID> m_agentsInTransit;
56 private ExpiringCache<UUID, ExpiringCache<ulong, DateTime>> m_bannedRegions = 57 private ExpiringCache<UUID, ExpiringCache<ulong, DateTime>> m_bannedRegions =
57 new ExpiringCache<UUID, ExpiringCache<ulong, DateTime>>(); 58 new ExpiringCache<UUID, ExpiringCache<ulong, DateTime>>();
@@ -96,6 +97,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
96 if (m_aScene == null) 97 if (m_aScene == null)
97 m_aScene = scene; 98 m_aScene = scene;
98 99
100 m_Scenes.Add(scene);
99 scene.RegisterModuleInterface<IEntityTransferModule>(this); 101 scene.RegisterModuleInterface<IEntityTransferModule>(this);
100 scene.EventManager.OnNewClient += OnNewClient; 102 scene.EventManager.OnNewClient += OnNewClient;
101 } 103 }
@@ -103,6 +105,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
103 protected virtual void OnNewClient(IClientAPI client) 105 protected virtual void OnNewClient(IClientAPI client)
104 { 106 {
105 client.OnTeleportHomeRequest += TeleportHome; 107 client.OnTeleportHomeRequest += TeleportHome;
108 client.OnTeleportLandmarkRequest += RequestTeleportLandmark;
106 } 109 }
107 110
108 public virtual void Close() 111 public virtual void Close()
@@ -118,6 +121,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
118 return; 121 return;
119 if (scene == m_aScene) 122 if (scene == m_aScene)
120 m_aScene = null; 123 m_aScene = null;
124
125 m_Scenes.Remove(scene);
121 } 126 }
122 127
123 public virtual void RegionLoaded(Scene scene) 128 public virtual void RegionLoaded(Scene scene)
@@ -127,7 +132,6 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
127 132
128 } 133 }
129 134
130
131 #endregion 135 #endregion
132 136
133 #region Agent Teleports 137 #region Agent Teleports
@@ -556,6 +560,29 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
556 560
557 #endregion 561 #endregion
558 562
563 #region Landmark Teleport
564 /// <summary>
565 /// Tries to teleport agent to landmark.
566 /// </summary>
567 /// <param name="remoteClient"></param>
568 /// <param name="regionHandle"></param>
569 /// <param name="position"></param>
570 public virtual void RequestTeleportLandmark(IClientAPI remoteClient, AssetLandmark lm)
571 {
572 GridRegion info = m_aScene.GridService.GetRegionByUUID(UUID.Zero, lm.RegionID);
573
574 if (info == null)
575 {
576 // can't find the region: Tell viewer and abort
577 remoteClient.SendTeleportFailed("The teleport destination could not be found.");
578 return;
579 }
580 ((Scene)(remoteClient.Scene)).RequestTeleportLocation(remoteClient, info.RegionHandle, lm.Position,
581 Vector3.Zero, (uint)(Constants.TeleportFlags.SetLastToTarget | Constants.TeleportFlags.ViaLandmark));
582 }
583
584 #endregion
585
559 #region Teleport Home 586 #region Teleport Home
560 587
561 public virtual void TeleportHome(UUID id, IClientAPI client) 588 public virtual void TeleportHome(UUID id, IClientAPI client)
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs
index 5c53f78..f6ec481 100644
--- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs
@@ -87,6 +87,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
87 protected override void OnNewClient(IClientAPI client) 87 protected override void OnNewClient(IClientAPI client)
88 { 88 {
89 client.OnTeleportHomeRequest += TeleportHome; 89 client.OnTeleportHomeRequest += TeleportHome;
90 client.OnTeleportLandmarkRequest += RequestTeleportLandmark;
90 client.OnConnectionClosed += new Action<IClientAPI>(OnConnectionClosed); 91 client.OnConnectionClosed += new Action<IClientAPI>(OnConnectionClosed);
91 } 92 }
92 93
@@ -228,6 +229,58 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
228 229
229 DoTeleport(sp, homeGatekeeper, finalDestination, position, lookAt, (uint)(Constants.TeleportFlags.SetLastToTarget | Constants.TeleportFlags.ViaHome), eq); 230 DoTeleport(sp, homeGatekeeper, finalDestination, position, lookAt, (uint)(Constants.TeleportFlags.SetLastToTarget | Constants.TeleportFlags.ViaHome), eq);
230 } 231 }
232
233 /// <summary>
234 /// Tries to teleport agent to landmark.
235 /// </summary>
236 /// <param name="remoteClient"></param>
237 /// <param name="regionHandle"></param>
238 /// <param name="position"></param>
239 public override void RequestTeleportLandmark(IClientAPI remoteClient, AssetLandmark lm)
240 {
241 m_log.DebugFormat("[HG ENTITY TRANSFER MODULE]: Teleporting agent via landmark to {0} region {1} position {2}",
242 (lm.Gatekeeper == string.Empty ? "local" : lm.Gatekeeper, lm.RegionID, lm.Position);
243 if (lm.Gatekeeper == string.Empty)
244 {
245 base.RequestTeleportLandmark(remoteClient, lm);
246 return;
247 }
248
249 GridRegion info = m_aScene.GridService.GetRegionByUUID(UUID.Zero, lm.RegionID);
250
251 // Local region?
252 if (info != null)
253 {
254 ((Scene)(remoteClient.Scene)).RequestTeleportLocation(remoteClient, info.RegionHandle, lm.Position,
255 Vector3.Zero, (uint)(Constants.TeleportFlags.SetLastToTarget | Constants.TeleportFlags.ViaLandmark));
256 return;
257 }
258 else
259 {
260 // Foreign region
261 Scene scene = (Scene)(remoteClient.Scene);
262 GatekeeperServiceConnector gConn = new GatekeeperServiceConnector();
263 GridRegion gatekeeper = new GridRegion();
264 gatekeeper.ServerURI = lm.Gatekeeper;
265 GridRegion finalDestination = gConn.GetHyperlinkRegion(gatekeeper, new UUID(lm.RegionID));
266 if (finalDestination != null)
267 {
268 ScenePresence sp = scene.GetScenePresence(remoteClient.AgentId);
269 IEntityTransferModule transferMod = scene.RequestModuleInterface<IEntityTransferModule>();
270 IEventQueue eq = sp.Scene.RequestModuleInterface<IEventQueue>();
271 if (transferMod != null && sp != null && eq != null)
272 transferMod.DoTeleport(sp, gatekeeper, finalDestination, lm.Position,
273 Vector3.UnitX, (uint)(Constants.TeleportFlags.SetLastToTarget | Constants.TeleportFlags.ViaLandmark), eq);
274 }
275
276 }
277
278 // can't find the region: Tell viewer and abort
279 remoteClient.SendTeleportFailed("The teleport destination could not be found.");
280
281 }
282
283
231 #endregion 284 #endregion
232 285
233 #region IUserAgentVerificationModule 286 #region IUserAgentVerificationModule
diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs
index 429dda7..7964b4f 100644
--- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs
@@ -56,6 +56,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
56 56
57 private string m_ProfileServerURI; 57 private string m_ProfileServerURI;
58 private bool m_OutboundPermission; 58 private bool m_OutboundPermission;
59 private string m_ThisGatekeeper;
59 60
60// private bool m_Initialized = false; 61// private bool m_Initialized = false;
61 62
@@ -85,6 +86,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
85 { 86 {
86 m_ProfileServerURI = thisModuleConfig.GetString("ProfileServerURI", string.Empty); 87 m_ProfileServerURI = thisModuleConfig.GetString("ProfileServerURI", string.Empty);
87 m_OutboundPermission = thisModuleConfig.GetBoolean("OutboundPermission", true); 88 m_OutboundPermission = thisModuleConfig.GetBoolean("OutboundPermission", true);
89 m_ThisGatekeeper = thisModuleConfig.GetString("Gatekeeper", string.Empty);
88 } 90 }
89 else 91 else
90 m_log.Warn("[HG INVENTORY ACCESS MODULE]: HGInventoryAccessModule configs not found. ProfileServerURI not set!"); 92 m_log.Warn("[HG INVENTORY ACCESS MODULE]: HGInventoryAccessModule configs not found. ProfileServerURI not set!");
@@ -119,6 +121,19 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
119 #endregion 121 #endregion
120 122
121 #region Overrides of Basic Inventory Access methods 123 #region Overrides of Basic Inventory Access methods
124
125 protected override string GenerateLandmark(ScenePresence presence, out string suffix)
126 {
127 suffix = " @ " + m_ThisGatekeeper;
128 Vector3 pos = presence.AbsolutePosition;
129 return String.Format("Landmark version 2\nregion_id {0}\nlocal_pos {1} {2} {3}\nregion_handle {4}\ngatekeeper {5}\n",
130 presence.Scene.RegionInfo.RegionID,
131 pos.X, pos.Y, pos.Z,
132 presence.RegionHandle,
133 m_ThisGatekeeper);
134 }
135
136
122 /// 137 ///
123 /// CapsUpdateInventoryItemAsset 138 /// CapsUpdateInventoryItemAsset
124 /// 139 ///
diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs
index 1370b1f..d441aa4 100644
--- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs
@@ -30,6 +30,7 @@ using System.Collections.Generic;
30using System.Net; 30using System.Net;
31using System.Xml; 31using System.Xml;
32using System.Reflection; 32using System.Reflection;
33using System.Text;
33using System.Threading; 34using System.Threading;
34 35
35using OpenSim.Framework; 36using OpenSim.Framework;
@@ -128,7 +129,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
128 129
129 protected virtual void OnNewClient(IClientAPI client) 130 protected virtual void OnNewClient(IClientAPI client)
130 { 131 {
131 132 client.OnCreateNewInventoryItem += CreateNewInventoryItem;
132 } 133 }
133 134
134 public virtual void Close() 135 public virtual void Close()
@@ -157,6 +158,85 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
157 #region Inventory Access 158 #region Inventory Access
158 159
159 /// <summary> 160 /// <summary>
161 /// Create a new inventory item. Called when the client creates a new item directly within their
162 /// inventory (e.g. by selecting a context inventory menu option).
163 /// </summary>
164 /// <param name="remoteClient"></param>
165 /// <param name="transactionID"></param>
166 /// <param name="folderID"></param>
167 /// <param name="callbackID"></param>
168 /// <param name="description"></param>
169 /// <param name="name"></param>
170 /// <param name="invType"></param>
171 /// <param name="type"></param>
172 /// <param name="wearableType"></param>
173 /// <param name="nextOwnerMask"></param>
174 public void CreateNewInventoryItem(IClientAPI remoteClient, UUID transactionID, UUID folderID,
175 uint callbackID, string description, string name, sbyte invType,
176 sbyte assetType,
177 byte wearableType, uint nextOwnerMask, int creationDate)
178 {
179 m_log.DebugFormat("[AGENT INVENTORY]: Received request to create inventory item {0} in folder {1}", name, folderID);
180
181 if (!m_Scene.Permissions.CanCreateUserInventory(invType, remoteClient.AgentId))
182 return;
183
184 InventoryFolderBase f = new InventoryFolderBase(folderID, remoteClient.AgentId);
185 InventoryFolderBase folder = m_Scene.InventoryService.GetFolder(f);
186
187 if (folder == null || folder.Owner != remoteClient.AgentId)
188 return;
189
190 if (transactionID == UUID.Zero)
191 {
192 ScenePresence presence;
193 if (m_Scene.TryGetScenePresence(remoteClient.AgentId, out presence))
194 {
195 byte[] data = null;
196
197 if (invType == (sbyte)InventoryType.Landmark && presence != null)
198 {
199 string suffix = string.Empty;
200 string strdata = GenerateLandmark(presence, out suffix);
201 data = Encoding.ASCII.GetBytes(strdata);
202 description += suffix;
203 }
204
205 AssetBase asset = m_Scene.CreateAsset(name, description, assetType, data, remoteClient.AgentId);
206 m_Scene.AssetService.Store(asset);
207
208 m_Scene.CreateNewInventoryItem(remoteClient, remoteClient.AgentId.ToString(), string.Empty, folderID, asset.Name, 0, callbackID, asset, invType, nextOwnerMask, creationDate);
209 }
210 else
211 {
212 m_log.ErrorFormat(
213 "ScenePresence for agent uuid {0} unexpectedly not found in CreateNewInventoryItem",
214 remoteClient.AgentId);
215 }
216 }
217 else
218 {
219 IAgentAssetTransactions agentTransactions = m_Scene.RequestModuleInterface<IAgentAssetTransactions>();
220 if (agentTransactions != null)
221 {
222 agentTransactions.HandleItemCreationFromTransaction(
223 remoteClient, transactionID, folderID, callbackID, description,
224 name, invType, assetType, wearableType, nextOwnerMask);
225 }
226 }
227 }
228
229 protected virtual string GenerateLandmark(ScenePresence presence, out string suffix)
230 {
231 suffix = string.Empty;
232 Vector3 pos = presence.AbsolutePosition;
233 return String.Format("Landmark version 2\nregion_id {0}\nlocal_pos {1} {2} {3}\nregion_handle {4}\n",
234 presence.Scene.RegionInfo.RegionID,
235 pos.X, pos.Y, pos.Z,
236 presence.RegionHandle);
237 }
238
239 /// <summary>
160 /// Capability originating call to update the asset of an item in an agent's inventory 240 /// Capability originating call to update the asset of an item in an agent's inventory
161 /// </summary> 241 /// </summary>
162 /// <param name="remoteClient"></param> 242 /// <param name="remoteClient"></param>
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
index 3c47873..b70e1c3 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
@@ -778,7 +778,7 @@ namespace OpenSim.Region.Framework.Scenes
778 /// <param name="asset"></param> 778 /// <param name="asset"></param>
779 /// <param name="invType"></param> 779 /// <param name="invType"></param>
780 /// <param name="nextOwnerMask"></param> 780 /// <param name="nextOwnerMask"></param>
781 private void CreateNewInventoryItem(IClientAPI remoteClient, string creatorID, string creatorData, UUID folderID, string name, uint flags, uint callbackID, 781 public void CreateNewInventoryItem(IClientAPI remoteClient, string creatorID, string creatorData, UUID folderID, string name, uint flags, uint callbackID,
782 AssetBase asset, sbyte invType, uint nextOwnerMask, int creationDate) 782 AssetBase asset, sbyte invType, uint nextOwnerMask, int creationDate)
783 { 783 {
784 CreateNewInventoryItem( 784 CreateNewInventoryItem(
@@ -833,78 +833,6 @@ namespace OpenSim.Region.Framework.Scenes
833 } 833 }
834 834
835 /// <summary> 835 /// <summary>
836 /// Create a new inventory item. Called when the client creates a new item directly within their
837 /// inventory (e.g. by selecting a context inventory menu option).
838 /// </summary>
839 /// <param name="remoteClient"></param>
840 /// <param name="transactionID"></param>
841 /// <param name="folderID"></param>
842 /// <param name="callbackID"></param>
843 /// <param name="description"></param>
844 /// <param name="name"></param>
845 /// <param name="invType"></param>
846 /// <param name="type"></param>
847 /// <param name="wearableType"></param>
848 /// <param name="nextOwnerMask"></param>
849 public void CreateNewInventoryItem(IClientAPI remoteClient, UUID transactionID, UUID folderID,
850 uint callbackID, string description, string name, sbyte invType,
851 sbyte assetType,
852 byte wearableType, uint nextOwnerMask, int creationDate)
853 {
854 m_log.DebugFormat("[AGENT INVENTORY]: Received request to create inventory item {0} in folder {1}", name, folderID);
855
856 if (!Permissions.CanCreateUserInventory(invType, remoteClient.AgentId))
857 return;
858
859 InventoryFolderBase f = new InventoryFolderBase(folderID, remoteClient.AgentId);
860 InventoryFolderBase folder = InventoryService.GetFolder(f);
861
862 if (folder == null || folder.Owner != remoteClient.AgentId)
863 return;
864
865 if (transactionID == UUID.Zero)
866 {
867 ScenePresence presence;
868 if (TryGetScenePresence(remoteClient.AgentId, out presence))
869 {
870 byte[] data = null;
871
872 if (invType == (sbyte)InventoryType.Landmark && presence != null)
873 {
874 Vector3 pos = presence.AbsolutePosition;
875 string strdata = String.Format(
876 "Landmark version 2\nregion_id {0}\nlocal_pos {1} {2} {3}\nregion_handle {4}\n",
877 presence.Scene.RegionInfo.RegionID,
878 pos.X, pos.Y, pos.Z,
879 presence.RegionHandle);
880 data = Encoding.ASCII.GetBytes(strdata);
881 }
882
883 AssetBase asset = CreateAsset(name, description, assetType, data, remoteClient.AgentId);
884 AssetService.Store(asset);
885
886 CreateNewInventoryItem(remoteClient, remoteClient.AgentId.ToString(), string.Empty, folderID, asset.Name, 0, callbackID, asset, invType, nextOwnerMask, creationDate);
887 }
888 else
889 {
890 m_log.ErrorFormat(
891 "ScenePresence for agent uuid {0} unexpectedly not found in CreateNewInventoryItem",
892 remoteClient.AgentId);
893 }
894 }
895 else
896 {
897 IAgentAssetTransactions agentTransactions = this.RequestModuleInterface<IAgentAssetTransactions>();
898 if (agentTransactions != null)
899 {
900 agentTransactions.HandleItemCreationFromTransaction(
901 remoteClient, transactionID, folderID, callbackID, description,
902 name, invType, assetType, wearableType, nextOwnerMask);
903 }
904 }
905 }
906
907 /// <summary>
908 /// Link an inventory item to an existing item. 836 /// Link an inventory item to an existing item.
909 /// </summary> 837 /// </summary>
910 /// <remarks> 838 /// <remarks>
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 1d562fd..77301d8 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -2726,7 +2726,7 @@ namespace OpenSim.Region.Framework.Scenes
2726 2726
2727 public virtual void SubscribeToClientInventoryEvents(IClientAPI client) 2727 public virtual void SubscribeToClientInventoryEvents(IClientAPI client)
2728 { 2728 {
2729 client.OnCreateNewInventoryItem += CreateNewInventoryItem; 2729
2730 client.OnLinkInventoryItem += HandleLinkInventoryItem; 2730 client.OnLinkInventoryItem += HandleLinkInventoryItem;
2731 client.OnCreateNewInventoryFolder += HandleCreateInventoryFolder; 2731 client.OnCreateNewInventoryFolder += HandleCreateInventoryFolder;
2732 client.OnUpdateInventoryFolder += HandleUpdateInventoryFolder; 2732 client.OnUpdateInventoryFolder += HandleUpdateInventoryFolder;
@@ -2749,7 +2749,6 @@ namespace OpenSim.Region.Framework.Scenes
2749 public virtual void SubscribeToClientTeleportEvents(IClientAPI client) 2749 public virtual void SubscribeToClientTeleportEvents(IClientAPI client)
2750 { 2750 {
2751 client.OnTeleportLocationRequest += RequestTeleportLocation; 2751 client.OnTeleportLocationRequest += RequestTeleportLocation;
2752 client.OnTeleportLandmarkRequest += RequestTeleportLandmark;
2753 } 2752 }
2754 2753
2755 public virtual void SubscribeToClientScriptEvents(IClientAPI client) 2754 public virtual void SubscribeToClientScriptEvents(IClientAPI client)
@@ -2853,7 +2852,7 @@ namespace OpenSim.Region.Framework.Scenes
2853 2852
2854 public virtual void UnSubscribeToClientInventoryEvents(IClientAPI client) 2853 public virtual void UnSubscribeToClientInventoryEvents(IClientAPI client)
2855 { 2854 {
2856 client.OnCreateNewInventoryItem -= CreateNewInventoryItem; 2855
2857 client.OnCreateNewInventoryFolder -= HandleCreateInventoryFolder; 2856 client.OnCreateNewInventoryFolder -= HandleCreateInventoryFolder;
2858 client.OnUpdateInventoryFolder -= HandleUpdateInventoryFolder; 2857 client.OnUpdateInventoryFolder -= HandleUpdateInventoryFolder;
2859 client.OnMoveInventoryFolder -= HandleMoveInventoryFolder; // 2; //!! 2858 client.OnMoveInventoryFolder -= HandleMoveInventoryFolder; // 2; //!!
@@ -2875,7 +2874,7 @@ namespace OpenSim.Region.Framework.Scenes
2875 public virtual void UnSubscribeToClientTeleportEvents(IClientAPI client) 2874 public virtual void UnSubscribeToClientTeleportEvents(IClientAPI client)
2876 { 2875 {
2877 client.OnTeleportLocationRequest -= RequestTeleportLocation; 2876 client.OnTeleportLocationRequest -= RequestTeleportLocation;
2878 client.OnTeleportLandmarkRequest -= RequestTeleportLandmark; 2877 //client.OnTeleportLandmarkRequest -= RequestTeleportLandmark;
2879 //client.OnTeleportHomeRequest -= TeleportClientHome; 2878 //client.OnTeleportHomeRequest -= TeleportClientHome;
2880 } 2879 }
2881 2880
@@ -3925,26 +3924,6 @@ namespace OpenSim.Region.Framework.Scenes
3925 } 3924 }
3926 } 3925 }
3927 3926
3928 /// <summary>
3929 /// Tries to teleport agent to landmark.
3930 /// </summary>
3931 /// <param name="remoteClient"></param>
3932 /// <param name="regionHandle"></param>
3933 /// <param name="position"></param>
3934 public void RequestTeleportLandmark(IClientAPI remoteClient, UUID regionID, Vector3 position)
3935 {
3936 GridRegion info = GridService.GetRegionByUUID(UUID.Zero, regionID);
3937
3938 if (info == null)
3939 {
3940 // can't find the region: Tell viewer and abort
3941 remoteClient.SendTeleportFailed("The teleport destination could not be found.");
3942 return;
3943 }
3944
3945 RequestTeleportLocation(remoteClient, info.RegionHandle, position, Vector3.Zero, (uint)(TPFlags.SetLastToTarget | TPFlags.ViaLandmark));
3946 }
3947
3948 public bool CrossAgentToNewRegion(ScenePresence agent, bool isFlying) 3927 public bool CrossAgentToNewRegion(ScenePresence agent, bool isFlying)
3949 { 3928 {
3950 if (m_teleportModule != null) 3929 if (m_teleportModule != null)
diff --git a/bin/config-include/GridCommon.ini.example b/bin/config-include/GridCommon.ini.example
index c5c26ec..e2e6459 100644
--- a/bin/config-include/GridCommon.ini.example
+++ b/bin/config-include/GridCommon.ini.example
@@ -100,10 +100,11 @@
100[HGInventoryAccessModule] 100[HGInventoryAccessModule]
101 ; 101 ;
102 ; === HG ONLY === 102 ; === HG ONLY ===
103 ; Change this to your profile server 103 ; Change this to your server
104 ; accessible from other grids 104 ; accessible from other grids
105 ; 105 ;
106 ProfileServerURI = "http://mygridserver.com:8002/user" 106 ProfileServerURI = "http://mygridserver.com:8002/user"
107 Gatekeeper = "http://mygridserver.com:8002"
107 ;; If you want to protect your assets from being copied by foreign visitors 108 ;; If you want to protect your assets from being copied by foreign visitors
108 ;; uncomment the next line. You may want to do this on sims that have licensed content. 109 ;; uncomment the next line. You may want to do this on sims that have licensed content.
109 ; OutboundPermission = False 110 ; OutboundPermission = False
diff --git a/bin/config-include/StandaloneCommon.ini.example b/bin/config-include/StandaloneCommon.ini.example
index aeebcd0..7359bba 100644
--- a/bin/config-include/StandaloneCommon.ini.example
+++ b/bin/config-include/StandaloneCommon.ini.example
@@ -36,6 +36,7 @@
36 36
37[HGInventoryAccessModule] 37[HGInventoryAccessModule]
38 ProfileServerURI = "http://127.0.0.1:9000/profiles" 38 ProfileServerURI = "http://127.0.0.1:9000/profiles"
39 Gatekeeper = "http://127.0.0.1:9000"
39 40
40 ;; If you want to protect your assets from being copied by foreign visitors 41 ;; If you want to protect your assets from being copied by foreign visitors
41 ;; uncomment the next line. You may want to do this on sims that have licensed content. 42 ;; uncomment the next line. You may want to do this on sims that have licensed content.