Instant Messages between users in the same region should actually now work.
parent
33326c1a70
commit
4af33c4da6
|
@ -35,7 +35,7 @@ using OpenSim.Framework.Data;
|
|||
namespace OpenSim.Framework.Interfaces
|
||||
{
|
||||
public delegate void ChatFromViewer(byte[] message, byte type, LLVector3 fromPos, string fromName, LLUUID fromAgentID);
|
||||
public delegate void ImprovedInstantMessage(LLUUID fromAgentID, LLUUID toAgentID, uint timestamp, string fromAgentName, string message); // Cut down from full list
|
||||
public delegate void ImprovedInstantMessage(LLUUID fromAgentID, LLUUID fromAgentSession, LLUUID toAgentID, LLUUID imSessionID, uint timestamp, string fromAgentName, string message, byte dialog); // Cut down from full list
|
||||
public delegate void RezObject(IClientAPI remoteClient, LLUUID itemID, LLVector3 pos);
|
||||
public delegate void ModifyTerrain(float height, float seconds, byte size, byte action, float north, float west, IClientAPI remoteClient);
|
||||
public delegate void SetAppearance(byte[] texture, AgentSetAppearancePacket.VisualParamBlock[] visualParam);
|
||||
|
@ -190,7 +190,7 @@ namespace OpenSim.Framework.Interfaces
|
|||
void SendRegionHandshake(RegionInfo regionInfo);
|
||||
void SendChatMessage(string message, byte type, LLVector3 fromPos, string fromName, LLUUID fromAgentID);
|
||||
void SendChatMessage(byte[] message, byte type, LLVector3 fromPos, string fromName, LLUUID fromAgentID);
|
||||
void SendInstantMessage(string message, LLUUID target, string fromName);
|
||||
void SendInstantMessage(LLUUID fromAgent, LLUUID fromAgentSession, string message, LLUUID toAgent, LLUUID imSessionID, string fromName, byte dialog, uint timeStamp);
|
||||
void SendLayerData(float[] map);
|
||||
void SendLayerData(int px, int py, float[] map);
|
||||
void MoveAgentIntoRegion(RegionInfo regInfo, LLVector3 pos, LLVector3 look);
|
||||
|
|
|
@ -116,7 +116,7 @@ namespace OpenSim.Framework
|
|||
public virtual void SendRegionHandshake(RegionInfo regionInfo){}
|
||||
public virtual void SendChatMessage(string message, byte type, LLVector3 fromPos, string fromName, LLUUID fromAgentID){}
|
||||
public virtual void SendChatMessage(byte[] message, byte type, LLVector3 fromPos, string fromName, LLUUID fromAgentID){}
|
||||
public virtual void SendInstantMessage(string message, LLUUID target, string fromName){}
|
||||
public virtual void SendInstantMessage(LLUUID fromAgent, LLUUID fromAgentSession, string message, LLUUID toAgent, LLUUID imSessionID, string fromName, byte dialog, uint timeStamp){}
|
||||
public virtual void SendLayerData(float[] map){}
|
||||
public virtual void SendLayerData(int px, int py, float[] map){}
|
||||
public virtual void MoveAgentIntoRegion(RegionInfo regInfo, LLVector3 pos, LLVector3 look){}
|
||||
|
|
|
@ -54,7 +54,7 @@ namespace OpenSim.Framework.Types
|
|||
public int simwideArea = 0;
|
||||
public int salePrice = 0; //Unemeplemented. Parcels price.
|
||||
public Parcel.ParcelStatus landStatus = Parcel.ParcelStatus.Leased;
|
||||
public uint landFlags = (uint)Parcel.ParcelFlags.AllowFly | (uint)Parcel.ParcelFlags.AllowLandmark | (uint)Parcel.ParcelFlags.AllowAllObjectEntry | (uint)Parcel.ParcelFlags.AllowDeedToGroup | (uint)Parcel.ParcelFlags.AllowTerraform | (uint)Parcel.ParcelFlags.CreateObjects | (uint)Parcel.ParcelFlags.AllowOtherScripts;
|
||||
public uint landFlags = (uint)Parcel.ParcelFlags.AllowFly | (uint)Parcel.ParcelFlags.AllowLandmark | (uint)Parcel.ParcelFlags.AllowAllObjectEntry | (uint)Parcel.ParcelFlags.AllowDeedToGroup | (uint)Parcel.ParcelFlags.AllowTerraform | (uint)Parcel.ParcelFlags.CreateObjects | (uint)Parcel.ParcelFlags.AllowOtherScripts | (uint)Parcel.ParcelFlags.SoundLocal ;
|
||||
public byte landingType = 0;
|
||||
public byte mediaAutoScale = 0;
|
||||
public LLUUID mediaID = LLUUID.Zero;
|
||||
|
|
|
@ -268,29 +268,27 @@ namespace OpenSim.Region.ClientStack
|
|||
/// <remarks>TODO</remarks>
|
||||
/// <param name="message"></param>
|
||||
/// <param name="target"></param>
|
||||
public void SendInstantMessage(string message, LLUUID target, string fromName)
|
||||
public void SendInstantMessage(LLUUID fromAgent, LLUUID fromAgentSession, string message, LLUUID toAgent, LLUUID imSessionID, string fromName, byte dialog, uint timeStamp)
|
||||
{
|
||||
if (message != "typing")
|
||||
{
|
||||
|
||||
Encoding enc = Encoding.ASCII;
|
||||
ImprovedInstantMessagePacket msg = new ImprovedInstantMessagePacket();
|
||||
msg.AgentData.AgentID = this.AgentID;
|
||||
msg.AgentData.SessionID = this.SessionID;
|
||||
msg.AgentData.AgentID = fromAgent;
|
||||
msg.AgentData.SessionID = fromAgentSession;
|
||||
msg.MessageBlock.FromAgentName = enc.GetBytes(fromName + " \0");
|
||||
msg.MessageBlock.Dialog = 0;
|
||||
msg.MessageBlock.Dialog = dialog;
|
||||
msg.MessageBlock.FromGroup = false;
|
||||
msg.MessageBlock.ID = target.Combine(this.SecureSessionID);
|
||||
msg.MessageBlock.ID = imSessionID;
|
||||
msg.MessageBlock.Offline = 0;
|
||||
msg.MessageBlock.ParentEstateID = 0;
|
||||
msg.MessageBlock.Position = new LLVector3();
|
||||
msg.MessageBlock.RegionID = new LLUUID();
|
||||
msg.MessageBlock.Timestamp = 0;
|
||||
msg.MessageBlock.ToAgentID = target;
|
||||
msg.MessageBlock.RegionID = LLUUID.Random();
|
||||
msg.MessageBlock.Timestamp = timeStamp;
|
||||
msg.MessageBlock.ToAgentID = toAgent;
|
||||
msg.MessageBlock.Message = enc.GetBytes(message + "\0");
|
||||
msg.MessageBlock.BinaryBucket = new byte[0];
|
||||
|
||||
this.OutPacket(msg);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -927,7 +925,7 @@ namespace OpenSim.Region.ClientStack
|
|||
{
|
||||
ObjectUpdatePacket outPacket = new ObjectUpdatePacket();
|
||||
outPacket.RegionData.RegionHandle = regionHandle;
|
||||
outPacket.RegionData.TimeDilation = timeDilation;
|
||||
outPacket.RegionData.TimeDilation = timeDilation;
|
||||
outPacket.ObjectData = new ObjectUpdatePacket.ObjectDataBlock[1];
|
||||
|
||||
outPacket.ObjectData[0] = this.CreatePrimUpdateBlock(primShape, flags);
|
||||
|
@ -938,6 +936,9 @@ namespace OpenSim.Region.ClientStack
|
|||
outPacket.ObjectData[0].Text = Helpers.StringToField(text);
|
||||
outPacket.ObjectData[0].ParentID = parentID;
|
||||
outPacket.ObjectData[0].PSBlock = particleSystem;
|
||||
outPacket.ObjectData[0].ClickAction = 0;
|
||||
//outPacket.ObjectData[0].Flags = 0;
|
||||
outPacket.ObjectData[0].Radius = 20;
|
||||
|
||||
byte[] pb = pos.GetBytes();
|
||||
Array.Copy(pb, 0, outPacket.ObjectData[0].ObjectData, 0, pb.Length);
|
||||
|
@ -1045,6 +1046,7 @@ namespace OpenSim.Region.ClientStack
|
|||
bytes[i++] = (byte)((ac >> 8) % 256);
|
||||
|
||||
dat.Data = bytes;
|
||||
|
||||
return (dat);
|
||||
}
|
||||
|
||||
|
@ -1196,7 +1198,7 @@ namespace OpenSim.Region.ClientStack
|
|||
ObjectUpdatePacket.ObjectDataBlock objdata = new ObjectUpdatePacket.ObjectDataBlock(); // new libsecondlife.Packets.ObjectUpdatePacket.ObjectDataBlock(data1, ref i);
|
||||
|
||||
SetDefaultAvatarPacketValues(ref objdata);
|
||||
objdata.UpdateFlags = 61 + (9 << 8) + (130 << 16) + (16 << 24);
|
||||
objdata.UpdateFlags = 61 + (9 << 8) + (130 << 16) + (16 << 24);
|
||||
objdata.PathCurve = 16;
|
||||
objdata.ProfileCurve = 1;
|
||||
objdata.PathScaleX = 100;
|
||||
|
|
|
@ -121,14 +121,12 @@ namespace OpenSim.Region.ClientStack
|
|||
break;
|
||||
case PacketType.ImprovedInstantMessage:
|
||||
ImprovedInstantMessagePacket msgpack = (ImprovedInstantMessagePacket)Pack;
|
||||
|
||||
string IMfromName = Util.FieldToString(msgpack.MessageBlock.FromAgentName);
|
||||
string IMmessage = Util.FieldToString(msgpack.MessageBlock.Message);
|
||||
|
||||
if (OnInstantMessage != null)
|
||||
{
|
||||
this.OnInstantMessage(msgpack.AgentData.AgentID, msgpack.MessageBlock.ToAgentID,
|
||||
msgpack.MessageBlock.Timestamp, IMfromName, IMmessage);
|
||||
this.OnInstantMessage(msgpack.AgentData.AgentID, msgpack.AgentData.SessionID, msgpack.MessageBlock.ToAgentID, msgpack.MessageBlock.ID,
|
||||
msgpack.MessageBlock.Timestamp, IMfromName, IMmessage, msgpack.MessageBlock.Dialog);
|
||||
}
|
||||
break;
|
||||
case PacketType.RezObject:
|
||||
|
@ -235,7 +233,6 @@ namespace OpenSim.Region.ClientStack
|
|||
{
|
||||
ObjectAddPacket addPacket = (ObjectAddPacket)Pack;
|
||||
PrimitiveBaseShape shape = GetShapeFromAddPacket(addPacket);
|
||||
|
||||
OnAddPrim(this.AgentId, addPacket.ObjectData.RayEnd, shape);
|
||||
}
|
||||
break;
|
||||
|
@ -460,9 +457,12 @@ namespace OpenSim.Region.ClientStack
|
|||
}
|
||||
break;
|
||||
case PacketType.UpdateTaskInventory:
|
||||
// Console.WriteLine(Pack.ToString());
|
||||
//Console.WriteLine(Pack.ToString());
|
||||
UpdateTaskInventoryPacket updatetask = (UpdateTaskInventoryPacket)Pack;
|
||||
break;
|
||||
case PacketType.RezScript:
|
||||
//Console.WriteLine(Pack.ToString());
|
||||
break;
|
||||
case PacketType.MapLayerRequest:
|
||||
this.RequestMapLayer();
|
||||
break;
|
||||
|
|
|
@ -273,23 +273,5 @@ namespace OpenSim.Region.ClientStack
|
|||
this.ClientThread.Abort();
|
||||
}
|
||||
|
||||
#region Inventory Creation
|
||||
private void SetupInventory(AuthenticateResponse sessionInfo)
|
||||
{
|
||||
|
||||
}
|
||||
private AgentInventory CreateInventory(LLUUID baseFolder)
|
||||
{
|
||||
AgentInventory inventory = null;
|
||||
|
||||
return inventory;
|
||||
}
|
||||
|
||||
private void CreateInventoryItem(CreateInventoryItemPacket packet)
|
||||
{
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -98,7 +98,7 @@ namespace OpenSim.Region.Communications.Local
|
|||
if (userProf != null)
|
||||
{
|
||||
this.InvenServices.CreateNewUserInventory(userProf.UUID);
|
||||
Console.WriteLine("created new inventory set for " + tempfirstname + " " + templastname);
|
||||
Console.WriteLine("Created new inventory set for " + tempfirstname + " " + templastname);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -122,7 +122,7 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
/// <param name="timestamp"></param>
|
||||
/// <param name="fromAgentName"></param>
|
||||
/// <param name="message"></param>
|
||||
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
|
||||
{
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -130,7 +130,7 @@ namespace SimpleApp
|
|||
public virtual void SendAnimation(LLUUID animID, int seq, LLUUID sourceAgentId) { }
|
||||
public virtual void SendChatMessage(string message, byte type, LLVector3 fromPos, string fromName, LLUUID fromAgentID) { }
|
||||
public virtual void SendChatMessage(byte[] message, byte type, LLVector3 fromPos, string fromName, LLUUID fromAgentID) { }
|
||||
public virtual void SendInstantMessage(string message, LLUUID target, string fromName) { }
|
||||
public virtual void SendInstantMessage(LLUUID fromAgent, LLUUID fromAgentSession, string message, LLUUID toAgent, LLUUID imSessionID, string fromName, byte dialog, uint timeStamp) { }
|
||||
public virtual void SendLayerData(float[] map) { }
|
||||
public virtual void SendLayerData(int px, int py, float[] map) { }
|
||||
public virtual void MoveAgentIntoRegion(RegionInfo regInfo, LLVector3 pos, LLVector3 look) { }
|
||||
|
|
Loading…
Reference in New Issue