diff options
Diffstat (limited to '')
10 files changed, 81 insertions, 24 deletions
diff --git a/OpenSim/Framework/GridInstantMessage.cs b/OpenSim/Framework/GridInstantMessage.cs index a6bf6e3..6ae0488 100644 --- a/OpenSim/Framework/GridInstantMessage.cs +++ b/OpenSim/Framework/GridInstantMessage.cs | |||
@@ -44,7 +44,6 @@ namespace OpenSim.Framework | |||
44 | public Vector3 Position; | 44 | public Vector3 Position; |
45 | public byte[] binaryBucket; | 45 | public byte[] binaryBucket; |
46 | 46 | ||
47 | |||
48 | public uint ParentEstateID; | 47 | public uint ParentEstateID; |
49 | public Guid RegionID; | 48 | public Guid RegionID; |
50 | public uint timestamp; | 49 | public uint timestamp; |
@@ -58,7 +57,7 @@ namespace OpenSim.Framework | |||
58 | string _fromAgentName, UUID _toAgentID, | 57 | string _fromAgentName, UUID _toAgentID, |
59 | byte _dialog, bool _fromGroup, string _message, | 58 | byte _dialog, bool _fromGroup, string _message, |
60 | UUID _imSessionID, bool _offline, Vector3 _position, | 59 | UUID _imSessionID, bool _offline, Vector3 _position, |
61 | byte[] _binaryBucket) | 60 | byte[] _binaryBucket, bool addTimestamp) |
62 | { | 61 | { |
63 | fromAgentID = _fromAgentID.Guid; | 62 | fromAgentID = _fromAgentID.Guid; |
64 | fromAgentName = _fromAgentName; | 63 | fromAgentName = _fromAgentName; |
@@ -79,7 +78,9 @@ namespace OpenSim.Framework | |||
79 | ParentEstateID = scene.RegionInfo.EstateSettings.ParentEstateID; | 78 | ParentEstateID = scene.RegionInfo.EstateSettings.ParentEstateID; |
80 | RegionID = scene.RegionInfo.RegionSettings.RegionUUID.Guid; | 79 | RegionID = scene.RegionInfo.RegionSettings.RegionUUID.Guid; |
81 | } | 80 | } |
82 | timestamp = (uint)Util.UnixTimeSinceEpoch(); | 81 | |
82 | if (addTimestamp) | ||
83 | timestamp = (uint)Util.UnixTimeSinceEpoch(); | ||
83 | } | 84 | } |
84 | 85 | ||
85 | public GridInstantMessage(IScene scene, UUID _fromAgentID, | 86 | public GridInstantMessage(IScene scene, UUID _fromAgentID, |
@@ -87,7 +88,7 @@ namespace OpenSim.Framework | |||
87 | string _message, bool _offline, | 88 | string _message, bool _offline, |
88 | Vector3 _position) : this(scene, _fromAgentID, _fromAgentName, | 89 | Vector3 _position) : this(scene, _fromAgentID, _fromAgentName, |
89 | _toAgentID, _dialog, false, _message, | 90 | _toAgentID, _dialog, false, _message, |
90 | _fromAgentID ^ _toAgentID, _offline, _position, new byte[0]) | 91 | _fromAgentID ^ _toAgentID, _offline, _position, new byte[0], true) |
91 | { | 92 | { |
92 | } | 93 | } |
93 | } | 94 | } |
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index d05ffea..0869bd5 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | |||
@@ -5862,7 +5862,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
5862 | msgpack.MessageBlock.ID, | 5862 | msgpack.MessageBlock.ID, |
5863 | msgpack.MessageBlock.Offline != 0 ? true : false, | 5863 | msgpack.MessageBlock.Offline != 0 ? true : false, |
5864 | msgpack.MessageBlock.Position, | 5864 | msgpack.MessageBlock.Position, |
5865 | msgpack.MessageBlock.BinaryBucket); | 5865 | msgpack.MessageBlock.BinaryBucket, |
5866 | true); | ||
5866 | 5867 | ||
5867 | handlerInstantMessage(this, im); | 5868 | handlerInstantMessage(this, im); |
5868 | } | 5869 | } |
diff --git a/OpenSim/Region/CoreModules/Avatar/Friends/CallingCardModule.cs b/OpenSim/Region/CoreModules/Avatar/Friends/CallingCardModule.cs index d942e87..5ec0ea9 100644 --- a/OpenSim/Region/CoreModules/Avatar/Friends/CallingCardModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Friends/CallingCardModule.cs | |||
@@ -141,7 +141,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends | |||
141 | client.FirstName+" "+client.LastName, | 141 | client.FirstName+" "+client.LastName, |
142 | destID, (byte)211, false, | 142 | destID, (byte)211, false, |
143 | String.Empty, | 143 | String.Empty, |
144 | transactionID, false, new Vector3(), new byte[0]), | 144 | transactionID, false, new Vector3(), new byte[0], true), |
145 | delegate(bool success) {} ); | 145 | delegate(bool success) {} ); |
146 | } | 146 | } |
147 | } | 147 | } |
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs index 91eda19..33b4839 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs | |||
@@ -297,6 +297,11 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer | |||
297 | }); | 297 | }); |
298 | } | 298 | } |
299 | } | 299 | } |
300 | |||
301 | // XXX: This code was placed here to try and accomdate RLV which moves given folders named #RLV/~<name> | ||
302 | // to a folder called name in #RLV. However, this approach may not be ultimately correct - from analysis | ||
303 | // of Firestorm 4.2.2 on sending an InventoryOffered instead of TaskInventoryOffered (as was previously | ||
304 | // done), the viewer itself would appear to move and rename the folder, rather than the simulator doing it here. | ||
300 | else if (im.dialog == (byte) InstantMessageDialog.TaskInventoryAccepted) | 305 | else if (im.dialog == (byte) InstantMessageDialog.TaskInventoryAccepted) |
301 | { | 306 | { |
302 | UUID destinationFolderID = UUID.Zero; | 307 | UUID destinationFolderID = UUID.Zero; |
@@ -308,6 +313,16 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer | |||
308 | 313 | ||
309 | if (destinationFolderID != UUID.Zero) | 314 | if (destinationFolderID != UUID.Zero) |
310 | { | 315 | { |
316 | InventoryFolderBase destinationFolder = new InventoryFolderBase(destinationFolderID, client.AgentId); | ||
317 | if (destinationFolder == null) | ||
318 | { | ||
319 | m_log.WarnFormat( | ||
320 | "[INVENTORY TRANSFER]: TaskInventoryAccepted message from {0} in {1} specified folder {2} which does not exist", | ||
321 | client.Name, scene.Name, destinationFolderID); | ||
322 | |||
323 | return; | ||
324 | } | ||
325 | |||
311 | IInventoryService invService = scene.InventoryService; | 326 | IInventoryService invService = scene.InventoryService; |
312 | 327 | ||
313 | UUID inventoryID = new UUID(im.imSessionID); // The inventory item/folder, back from it's trip | 328 | UUID inventoryID = new UUID(im.imSessionID); // The inventory item/folder, back from it's trip |
@@ -315,9 +330,11 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer | |||
315 | InventoryItemBase item = new InventoryItemBase(inventoryID, client.AgentId); | 330 | InventoryItemBase item = new InventoryItemBase(inventoryID, client.AgentId); |
316 | item = invService.GetItem(item); | 331 | item = invService.GetItem(item); |
317 | InventoryFolderBase folder = null; | 332 | InventoryFolderBase folder = null; |
333 | UUID? previousParentFolderID = null; | ||
318 | 334 | ||
319 | if (item != null) // It's an item | 335 | if (item != null) // It's an item |
320 | { | 336 | { |
337 | previousParentFolderID = item.Folder; | ||
321 | item.Folder = destinationFolderID; | 338 | item.Folder = destinationFolderID; |
322 | 339 | ||
323 | invService.DeleteItems(item.Owner, new List<UUID>() { item.ID }); | 340 | invService.DeleteItems(item.Owner, new List<UUID>() { item.ID }); |
@@ -330,10 +347,22 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer | |||
330 | 347 | ||
331 | if (folder != null) // It's a folder | 348 | if (folder != null) // It's a folder |
332 | { | 349 | { |
350 | previousParentFolderID = folder.ParentID; | ||
333 | folder.ParentID = destinationFolderID; | 351 | folder.ParentID = destinationFolderID; |
334 | invService.MoveFolder(folder); | 352 | invService.MoveFolder(folder); |
335 | } | 353 | } |
336 | } | 354 | } |
355 | |||
356 | // Tell client about updates to original parent and new parent (this should probably be factored with existing move item/folder code). | ||
357 | if (previousParentFolderID != null) | ||
358 | { | ||
359 | InventoryFolderBase previousParentFolder | ||
360 | = new InventoryFolderBase((UUID)previousParentFolderID, client.AgentId); | ||
361 | previousParentFolder = invService.GetFolder(previousParentFolder); | ||
362 | scene.SendInventoryUpdate(client, previousParentFolder, true, true); | ||
363 | |||
364 | scene.SendInventoryUpdate(client, destinationFolder, true, true); | ||
365 | } | ||
337 | } | 366 | } |
338 | } | 367 | } |
339 | else if ( | 368 | else if ( |
@@ -354,9 +383,11 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer | |||
354 | InventoryItemBase item = new InventoryItemBase(inventoryID, client.AgentId); | 383 | InventoryItemBase item = new InventoryItemBase(inventoryID, client.AgentId); |
355 | item = invService.GetItem(item); | 384 | item = invService.GetItem(item); |
356 | InventoryFolderBase folder = null; | 385 | InventoryFolderBase folder = null; |
386 | UUID? previousParentFolderID = null; | ||
357 | 387 | ||
358 | if (item != null && trashFolder != null) | 388 | if (item != null && trashFolder != null) |
359 | { | 389 | { |
390 | previousParentFolderID = item.Folder; | ||
360 | item.Folder = trashFolder.ID; | 391 | item.Folder = trashFolder.ID; |
361 | 392 | ||
362 | // Diva comment: can't we just update this item??? | 393 | // Diva comment: can't we just update this item??? |
@@ -372,6 +403,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer | |||
372 | 403 | ||
373 | if (folder != null & trashFolder != null) | 404 | if (folder != null & trashFolder != null) |
374 | { | 405 | { |
406 | previousParentFolderID = folder.ParentID; | ||
375 | folder.ParentID = trashFolder.ID; | 407 | folder.ParentID = trashFolder.ID; |
376 | invService.MoveFolder(folder); | 408 | invService.MoveFolder(folder); |
377 | } | 409 | } |
@@ -391,6 +423,16 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer | |||
391 | client.SendAgentAlertMessage("Unable to delete "+ | 423 | client.SendAgentAlertMessage("Unable to delete "+ |
392 | "received inventory" + reason, false); | 424 | "received inventory" + reason, false); |
393 | } | 425 | } |
426 | // Tell client about updates to original parent and new parent (this should probably be factored with existing move item/folder code). | ||
427 | else if (previousParentFolderID != null) | ||
428 | { | ||
429 | InventoryFolderBase previousParentFolder | ||
430 | = new InventoryFolderBase((UUID)previousParentFolderID, client.AgentId); | ||
431 | previousParentFolder = invService.GetFolder(previousParentFolder); | ||
432 | scene.SendInventoryUpdate(client, previousParentFolder, true, true); | ||
433 | |||
434 | scene.SendInventoryUpdate(client, trashFolder, true, true); | ||
435 | } | ||
394 | 436 | ||
395 | ScenePresence user = scene.GetScenePresence(new UUID(im.toAgentID)); | 437 | ScenePresence user = scene.GetScenePresence(new UUID(im.toAgentID)); |
396 | 438 | ||
diff --git a/OpenSim/Region/CoreModules/Avatar/Lure/HGLureModule.cs b/OpenSim/Region/CoreModules/Avatar/Lure/HGLureModule.cs index 92cf9d1..9c369f6 100644 --- a/OpenSim/Region/CoreModules/Avatar/Lure/HGLureModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Lure/HGLureModule.cs | |||
@@ -186,7 +186,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Lure | |||
186 | client.FirstName+" "+client.LastName, targetid, | 186 | client.FirstName+" "+client.LastName, targetid, |
187 | (byte)InstantMessageDialog.RequestTeleport, false, | 187 | (byte)InstantMessageDialog.RequestTeleport, false, |
188 | message, sessionID, false, presence.AbsolutePosition, | 188 | message, sessionID, false, presence.AbsolutePosition, |
189 | new Byte[0]); | 189 | new Byte[0], true); |
190 | m.RegionID = client.Scene.RegionInfo.RegionID.Guid; | 190 | m.RegionID = client.Scene.RegionInfo.RegionID.Guid; |
191 | 191 | ||
192 | m_log.DebugFormat("[HG LURE MODULE]: RequestTeleport sessionID={0}, regionID={1}, message={2}", m.imSessionID, m.RegionID, m.message); | 192 | m_log.DebugFormat("[HG LURE MODULE]: RequestTeleport sessionID={0}, regionID={1}, message={2}", m.imSessionID, m.RegionID, m.message); |
diff --git a/OpenSim/Region/CoreModules/Avatar/Lure/LureModule.cs b/OpenSim/Region/CoreModules/Avatar/Lure/LureModule.cs index 2d4cffd..6ce9556 100644 --- a/OpenSim/Region/CoreModules/Avatar/Lure/LureModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Lure/LureModule.cs | |||
@@ -169,7 +169,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Lure | |||
169 | client.FirstName+" "+client.LastName, targetid, | 169 | client.FirstName+" "+client.LastName, targetid, |
170 | (byte)InstantMessageDialog.RequestTeleport, false, | 170 | (byte)InstantMessageDialog.RequestTeleport, false, |
171 | message, dest, false, presence.AbsolutePosition, | 171 | message, dest, false, presence.AbsolutePosition, |
172 | new Byte[0]); | 172 | new Byte[0], true); |
173 | 173 | ||
174 | if (m_TransferModule != null) | 174 | if (m_TransferModule != null) |
175 | { | 175 | { |
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs index b51570f..617a350 100644 --- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs | |||
@@ -1068,6 +1068,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
1068 | Scene initiatingScene) | 1068 | Scene initiatingScene) |
1069 | { | 1069 | { |
1070 | Thread.Sleep(10000); | 1070 | Thread.Sleep(10000); |
1071 | |||
1071 | IMessageTransferModule im = initiatingScene.RequestModuleInterface<IMessageTransferModule>(); | 1072 | IMessageTransferModule im = initiatingScene.RequestModuleInterface<IMessageTransferModule>(); |
1072 | if (im != null) | 1073 | if (im != null) |
1073 | { | 1074 | { |
@@ -1080,11 +1081,22 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
1080 | (uint)(int)position.X, | 1081 | (uint)(int)position.X, |
1081 | (uint)(int)position.Y, | 1082 | (uint)(int)position.Y, |
1082 | (uint)(int)position.Z); | 1083 | (uint)(int)position.Z); |
1083 | GridInstantMessage m = new GridInstantMessage(initiatingScene, UUID.Zero, | 1084 | |
1084 | "Region", agent.UUID, | 1085 | GridInstantMessage m |
1085 | (byte)InstantMessageDialog.GodLikeRequestTeleport, false, | 1086 | = new GridInstantMessage( |
1086 | "", gotoLocation, false, new Vector3(127, 0, 0), | 1087 | initiatingScene, |
1087 | new Byte[0]); | 1088 | UUID.Zero, |
1089 | "Region", | ||
1090 | agent.UUID, | ||
1091 | (byte)InstantMessageDialog.GodLikeRequestTeleport, | ||
1092 | false, | ||
1093 | "", | ||
1094 | gotoLocation, | ||
1095 | false, | ||
1096 | new Vector3(127, 0, 0), | ||
1097 | new Byte[0], | ||
1098 | false); | ||
1099 | |||
1088 | im.SendInstantMessage(m, delegate(bool success) | 1100 | im.SendInstantMessage(m, delegate(bool success) |
1089 | { | 1101 | { |
1090 | m_log.DebugFormat("[ENTITY TRANSFER MODULE]: Client Initiating Teleport sending IM success = {0}", success); | 1102 | m_log.DebugFormat("[ENTITY TRANSFER MODULE]: Client Initiating Teleport sending IM success = {0}", success); |
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs index 3b59dc4..b23ddb4 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | |||
@@ -1424,7 +1424,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1424 | return newFolderID; | 1424 | return newFolderID; |
1425 | } | 1425 | } |
1426 | 1426 | ||
1427 | private void SendInventoryUpdate(IClientAPI client, InventoryFolderBase folder, bool fetchFolders, bool fetchItems) | 1427 | public void SendInventoryUpdate(IClientAPI client, InventoryFolderBase folder, bool fetchFolders, bool fetchItems) |
1428 | { | 1428 | { |
1429 | if (folder == null) | 1429 | if (folder == null) |
1430 | return; | 1430 | return; |
diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs index a8e4d90..ffd4222 100644 --- a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs +++ b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs | |||
@@ -148,7 +148,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC | |||
148 | OnInstantMessage(this, new GridInstantMessage(m_scene, | 148 | OnInstantMessage(this, new GridInstantMessage(m_scene, |
149 | m_uuid, m_firstname + " " + m_lastname, | 149 | m_uuid, m_firstname + " " + m_lastname, |
150 | target, 0, false, message, | 150 | target, 0, false, message, |
151 | UUID.Zero, false, Position, new byte[0])); | 151 | UUID.Zero, false, Position, new byte[0], true)); |
152 | } | 152 | } |
153 | 153 | ||
154 | public void SendAgentOffline(UUID[] agentIDs) | 154 | public void SendAgentOffline(UUID[] agentIDs) |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 7fa6f05..7620df3 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -3978,7 +3978,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3978 | World.RegionInfo.RegionName+" "+ | 3978 | World.RegionInfo.RegionName+" "+ |
3979 | m_host.AbsolutePosition.ToString(), | 3979 | m_host.AbsolutePosition.ToString(), |
3980 | agentItem.ID, true, m_host.AbsolutePosition, | 3980 | agentItem.ID, true, m_host.AbsolutePosition, |
3981 | bucket); | 3981 | bucket, true); // TODO: May actually send no timestamp |
3982 | 3982 | ||
3983 | m_TransferModule.SendInstantMessage(msg, delegate(bool success) {}); | 3983 | m_TransferModule.SendInstantMessage(msg, delegate(bool success) {}); |
3984 | } | 3984 | } |
@@ -6452,16 +6452,17 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
6452 | if (m_TransferModule != null) | 6452 | if (m_TransferModule != null) |
6453 | { | 6453 | { |
6454 | byte[] bucket = new byte[] { (byte)AssetType.Folder }; | 6454 | byte[] bucket = new byte[] { (byte)AssetType.Folder }; |
6455 | 6455 | ||
6456 | Vector3 pos = m_host.AbsolutePosition; | ||
6457 | |||
6456 | GridInstantMessage msg = new GridInstantMessage(World, | 6458 | GridInstantMessage msg = new GridInstantMessage(World, |
6457 | m_host.UUID, m_host.Name + ", an object owned by " + | 6459 | m_host.OwnerID, m_host.Name, destID, |
6458 | resolveName(m_host.OwnerID) + ",", destID, | ||
6459 | (byte)InstantMessageDialog.TaskInventoryOffered, | 6460 | (byte)InstantMessageDialog.TaskInventoryOffered, |
6460 | false, category + "\n" + m_host.Name + " is located at " + | 6461 | false, string.Format("'{0}'"), |
6461 | World.RegionInfo.RegionName + " " + | 6462 | // We won't go so far as to add a SLURL, but this is the format used by LL as of 2012-10-06 |
6462 | m_host.AbsolutePosition.ToString(), | 6463 | // false, string.Format("'{0}' ( http://slurl.com/secondlife/{1}/{2}/{3}/{4} )", category, World.Name, (int)pos.X, (int)pos.Y, (int)pos.Z), |
6463 | folderID, true, m_host.AbsolutePosition, | 6464 | folderID, false, pos, |
6464 | bucket); | 6465 | bucket, false); |
6465 | 6466 | ||
6466 | m_TransferModule.SendInstantMessage(msg, delegate(bool success) {}); | 6467 | m_TransferModule.SendInstantMessage(msg, delegate(bool success) {}); |
6467 | } | 6468 | } |