From 4af33c4da6774363db0d442f81b4871718cc5f2e Mon Sep 17 00:00:00 2001 From: MW Date: Mon, 20 Aug 2007 11:52:55 +0000 Subject: Instant Messages between users in the same region should actually now work. --- OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs | 4 ++-- OpenSim/Region/Environment/Scenes/Scene.cs | 6 ++---- OpenSim/Region/Environment/Scenes/SceneObjectPart.cs | 13 +++++++------ 3 files changed, 11 insertions(+), 12 deletions(-) (limited to 'OpenSim/Region/Environment/Scenes') diff --git a/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs b/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs index a35140d..0ed10c0 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs @@ -122,7 +122,7 @@ namespace OpenSim.Region.Environment.Scenes /// /// /// - public void InstantMessage(LLUUID fromAgentID, LLUUID toAgentID, uint timestamp, string fromAgentName, string message) + public void InstantMessage(LLUUID fromAgentID, LLUUID fromAgentSession, LLUUID toAgentID, LLUUID imSessionID, uint timestamp, string fromAgentName, string message, byte dialog) { if (this.Avatars.ContainsKey(toAgentID)) { @@ -132,7 +132,7 @@ namespace OpenSim.Region.Environment.Scenes ScenePresence fromAvatar = this.Avatars[fromAgentID]; ScenePresence toAvatar = this.Avatars[toAgentID]; string fromName = fromAvatar.Firstname + " " + fromAvatar.Lastname; - toAvatar.ControllingClient.SendInstantMessage(message, toAgentID, fromName); + toAvatar.ControllingClient.SendInstantMessage( fromAgentID, fromAgentSession, message, toAgentID, imSessionID, fromName, dialog, timestamp); } else { diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index 7834230..d1a16e0 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs @@ -694,11 +694,9 @@ namespace OpenSim.Region.Environment.Scenes client.OnParcelPropertiesRequest += new ParcelPropertiesRequest(m_LandManager.handleParcelPropertiesRequest); client.OnParcelDivideRequest += new ParcelDivideRequest(m_LandManager.handleParcelDivideRequest); client.OnParcelJoinRequest += new ParcelJoinRequest(m_LandManager.handleParcelJoinRequest); - client.OnParcelPropertiesUpdateRequest += - new ParcelPropertiesUpdateRequest(m_LandManager.handleParcelPropertiesUpdateRequest); + client.OnParcelPropertiesUpdateRequest += new ParcelPropertiesUpdateRequest(m_LandManager.handleParcelPropertiesUpdateRequest); client.OnParcelSelectObjects += new ParcelSelectObjects(m_LandManager.handleParcelSelectObjectsRequest); - client.OnParcelObjectOwnerRequest += - new ParcelObjectOwnerRequest(m_LandManager.handleParcelObjectOwnersRequest); + client.OnParcelObjectOwnerRequest += new ParcelObjectOwnerRequest(m_LandManager.handleParcelObjectOwnersRequest); client.OnEstateOwnerMessage += new EstateOwnerMessageRequest(m_estateManager.handleEstateOwnerMessage); diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs index c8a7515..8cf55ad 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs @@ -64,7 +64,7 @@ namespace OpenSim.Region.Environment.Scenes set { m_name = value; } } - protected LLObject.ObjectFlags m_flags = (LLObject.ObjectFlags)32 + 65536 + 131072 + 256 + 4 + 8 + 268435456 + 128; + protected LLObject.ObjectFlags m_flags = (LLObject.ObjectFlags)32 + 65536 + 131072 + 256 +4 +8 + 268435456 + 128; public uint ObjectFlags { get { return (uint)m_flags; } @@ -405,7 +405,7 @@ namespace OpenSim.Region.Environment.Scenes { if (localID == this.m_localID) { - // client.SendTaskInventory(this.m_uuid, 0, Helpers.StringToField("primInventory")); + //client.SendTaskInventory(this.m_uuid, 1, Helpers.StringToField("primInventory2")); client.SendTaskInventory(this.m_uuid, 0, new byte[0]); } } @@ -421,7 +421,7 @@ namespace OpenSim.Region.Environment.Scenes InventoryStringBuilder invString = new InventoryStringBuilder(); invString.AddItemStart(); invString.AddNameValueLine("item_id", LLUUID.Random().ToStringHyphenated()); - invString.AddNameValueLine("parent_id", this.UUID.ToStringHyphenated()); + invString.AddNameValueLine("parent_id",LLUUID.Zero.ToStringHyphenated()); invString.AddPermissionsStart(); invString.AddNameValueLine("base_mask", "0x7FFFFFFF"); @@ -435,9 +435,9 @@ namespace OpenSim.Region.Environment.Scenes invString.AddNameValueLine("group_id", LLUUID.Zero.ToStringHyphenated()); invString.AddSectionEnd(); - invString.AddNameValueLine("asset_id", "00000000-0000-0000-9999-000000000002"); - invString.AddNameValueLine("type", "texture"); - invString.AddNameValueLine("inv_type" , "texture"); + invString.AddNameValueLine("asset_id", "00000000-0000-2222-3333-000000000001"); + invString.AddNameValueLine("type", "lsltext"); + invString.AddNameValueLine("inv_type" , "lsltext"); invString.AddNameValueLine("flags", "0x00"); invString.AddNameValueLine("name", "Test inventory" + "|"); invString.AddNameValueLine("desc", "test description" + "|"); @@ -446,6 +446,7 @@ namespace OpenSim.Region.Environment.Scenes byte[] fileInv = Helpers.StringToField(invString.BuildString); byte[] data = new byte[fileInv.Length + 4]; + Array.Copy(Helpers.IntToBytes(fileInv.Length), 0, data, 0, 4); Array.Copy(fileInv, 0,data , 4, fileInv.Length); client.SendXferPacket(xferID, 0 + 0x80000000, data); } -- cgit v1.1