diff options
Diffstat (limited to 'OpenSim')
3 files changed, 24 insertions, 10 deletions
diff --git a/OpenSim/Framework/GridInstantMessage.cs b/OpenSim/Framework/GridInstantMessage.cs index da3690c..d856173 100644 --- a/OpenSim/Framework/GridInstantMessage.cs +++ b/OpenSim/Framework/GridInstantMessage.cs | |||
@@ -47,6 +47,7 @@ namespace OpenSim.Framework | |||
47 | public uint ParentEstateID; | 47 | public uint ParentEstateID; |
48 | public Guid RegionID; | 48 | public Guid RegionID; |
49 | public uint timestamp; | 49 | public uint timestamp; |
50 | public Guid ID; | ||
50 | 51 | ||
51 | public GridInstantMessage() | 52 | public GridInstantMessage() |
52 | { | 53 | { |
@@ -66,6 +67,8 @@ namespace OpenSim.Framework | |||
66 | Position = im.Position; | 67 | Position = im.Position; |
67 | binaryBucket = im.binaryBucket; | 68 | binaryBucket = im.binaryBucket; |
68 | RegionID = im.RegionID; | 69 | RegionID = im.RegionID; |
70 | ParentEstateID = im.ParentEstateID; | ||
71 | ID = im.ID; | ||
69 | 72 | ||
70 | if (addTimestamp) | 73 | if (addTimestamp) |
71 | timestamp = (uint)Util.UnixTimeSinceEpoch(); | 74 | timestamp = (uint)Util.UnixTimeSinceEpoch(); |
@@ -75,7 +78,7 @@ namespace OpenSim.Framework | |||
75 | string _fromAgentName, UUID _toAgentID, | 78 | string _fromAgentName, UUID _toAgentID, |
76 | byte _dialog, bool _fromGroup, string _message, | 79 | byte _dialog, bool _fromGroup, string _message, |
77 | UUID _imSessionID, bool _offline, Vector3 _position, | 80 | UUID _imSessionID, bool _offline, Vector3 _position, |
78 | byte[] _binaryBucket, bool addTimestamp) | 81 | byte[] _binaryBucket, UUID _ID, bool addTimestamp) |
79 | { | 82 | { |
80 | fromAgentID = _fromAgentID.Guid; | 83 | fromAgentID = _fromAgentID.Guid; |
81 | fromAgentName = _fromAgentName; | 84 | fromAgentName = _fromAgentName; |
@@ -84,6 +87,8 @@ namespace OpenSim.Framework | |||
84 | fromGroup = _fromGroup; | 87 | fromGroup = _fromGroup; |
85 | message = _message; | 88 | message = _message; |
86 | imSessionID = _imSessionID.Guid; | 89 | imSessionID = _imSessionID.Guid; |
90 | ID = _ID.Guid; | ||
91 | |||
87 | if (_offline) | 92 | if (_offline) |
88 | offline = 1; | 93 | offline = 1; |
89 | else | 94 | else |
@@ -102,11 +107,21 @@ namespace OpenSim.Framework | |||
102 | } | 107 | } |
103 | 108 | ||
104 | public GridInstantMessage(IScene scene, UUID _fromAgentID, | 109 | public GridInstantMessage(IScene scene, UUID _fromAgentID, |
110 | string _fromAgentName, UUID _toAgentID, | ||
111 | byte _dialog, bool _fromGroup, string _message, | ||
112 | UUID _imSessionID, bool _offline, Vector3 _position, | ||
113 | byte[] _binaryBucket, bool addTimestamp) : this(scene, _fromAgentID, _fromAgentName, | ||
114 | _toAgentID, _dialog, false, _message, | ||
115 | _fromAgentID ^ _toAgentID, _offline, _position, new byte[0], UUID.Zero, true) | ||
116 | { | ||
117 | } | ||
118 | |||
119 | public GridInstantMessage(IScene scene, UUID _fromAgentID, | ||
105 | string _fromAgentName, UUID _toAgentID, byte _dialog, | 120 | string _fromAgentName, UUID _toAgentID, byte _dialog, |
106 | string _message, bool _offline, | 121 | string _message, bool _offline, |
107 | Vector3 _position) : this(scene, _fromAgentID, _fromAgentName, | 122 | Vector3 _position) : this(scene, _fromAgentID, _fromAgentName, |
108 | _toAgentID, _dialog, false, _message, | 123 | _toAgentID, _dialog, false, _message, |
109 | _fromAgentID ^ _toAgentID, _offline, _position, new byte[0], true) | 124 | _fromAgentID ^ _toAgentID, _offline, _position, new byte[0], UUID.Zero, true) |
110 | { | 125 | { |
111 | } | 126 | } |
112 | } | 127 | } |
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index 6dd2ffd..68fe8d9 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | |||
@@ -953,7 +953,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
953 | /// Send an instant message to this client | 953 | /// Send an instant message to this client |
954 | /// </summary> | 954 | /// </summary> |
955 | // | 955 | // |
956 | // Don't remove transaction ID! Groups and item gives need to set it! | ||
957 | public void SendInstantMessage(GridInstantMessage im) | 956 | public void SendInstantMessage(GridInstantMessage im) |
958 | { | 957 | { |
959 | if (((Scene)(m_scene)).Permissions.CanInstantMessage(new UUID(im.fromAgentID), new UUID(im.toAgentID))) | 958 | if (((Scene)(m_scene)).Permissions.CanInstantMessage(new UUID(im.fromAgentID), new UUID(im.toAgentID))) |
@@ -962,14 +961,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
962 | = (ImprovedInstantMessagePacket)PacketPool.Instance.GetPacket(PacketType.ImprovedInstantMessage); | 961 | = (ImprovedInstantMessagePacket)PacketPool.Instance.GetPacket(PacketType.ImprovedInstantMessage); |
963 | 962 | ||
964 | msg.AgentData.AgentID = new UUID(im.fromAgentID); | 963 | msg.AgentData.AgentID = new UUID(im.fromAgentID); |
965 | msg.AgentData.SessionID = UUID.Zero; | 964 | msg.AgentData.SessionID = new UUID(im.imSessionID); |
966 | msg.MessageBlock.FromAgentName = Util.StringToBytes256(im.fromAgentName); | 965 | msg.MessageBlock.FromAgentName = Util.StringToBytes256(im.fromAgentName); |
967 | msg.MessageBlock.Dialog = im.dialog; | 966 | msg.MessageBlock.Dialog = im.dialog; |
968 | msg.MessageBlock.FromGroup = im.fromGroup; | 967 | msg.MessageBlock.FromGroup = im.fromGroup; |
969 | if (im.imSessionID == UUID.Zero.Guid) | 968 | msg.MessageBlock.ID = new UUID(im.ID); |
970 | msg.MessageBlock.ID = new UUID(im.fromAgentID) ^ new UUID(im.toAgentID); | ||
971 | else | ||
972 | msg.MessageBlock.ID = new UUID(im.imSessionID); | ||
973 | msg.MessageBlock.Offline = im.offline; | 969 | msg.MessageBlock.Offline = im.offline; |
974 | msg.MessageBlock.ParentEstateID = im.ParentEstateID; | 970 | msg.MessageBlock.ParentEstateID = im.ParentEstateID; |
975 | msg.MessageBlock.Position = im.Position; | 971 | msg.MessageBlock.Position = im.Position; |
diff --git a/OpenSim/Region/CoreModules/Avatar/InstantMessage/MessageTransferModule.cs b/OpenSim/Region/CoreModules/Avatar/InstantMessage/MessageTransferModule.cs index 6958905..1366103 100644 --- a/OpenSim/Region/CoreModules/Avatar/InstantMessage/MessageTransferModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/InstantMessage/MessageTransferModule.cs | |||
@@ -216,6 +216,7 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage | |||
216 | UUID fromAgentID = UUID.Zero; | 216 | UUID fromAgentID = UUID.Zero; |
217 | UUID toAgentID = UUID.Zero; | 217 | UUID toAgentID = UUID.Zero; |
218 | UUID imSessionID = UUID.Zero; | 218 | UUID imSessionID = UUID.Zero; |
219 | UUID imID = UUID.Zero; | ||
219 | uint timestamp = 0; | 220 | uint timestamp = 0; |
220 | string fromAgentName = ""; | 221 | string fromAgentName = ""; |
221 | string message = ""; | 222 | string message = ""; |
@@ -232,7 +233,6 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage | |||
232 | float pos_z = 0; | 233 | float pos_z = 0; |
233 | //m_log.Info("Processing IM"); | 234 | //m_log.Info("Processing IM"); |
234 | 235 | ||
235 | |||
236 | Hashtable requestData = (Hashtable)request.Params[0]; | 236 | Hashtable requestData = (Hashtable)request.Params[0]; |
237 | // Check if it's got all the data | 237 | // Check if it's got all the data |
238 | if (requestData.ContainsKey("from_agent_id") | 238 | if (requestData.ContainsKey("from_agent_id") |
@@ -263,6 +263,7 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage | |||
263 | UUID.TryParse((string)requestData["to_agent_id"], out toAgentID); | 263 | UUID.TryParse((string)requestData["to_agent_id"], out toAgentID); |
264 | UUID.TryParse((string)requestData["im_session_id"], out imSessionID); | 264 | UUID.TryParse((string)requestData["im_session_id"], out imSessionID); |
265 | UUID.TryParse((string)requestData["region_id"], out RegionID); | 265 | UUID.TryParse((string)requestData["region_id"], out RegionID); |
266 | UUID.TryParse((string)requestData["id"], out imID); | ||
266 | 267 | ||
267 | try | 268 | try |
268 | { | 269 | { |
@@ -390,6 +391,7 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage | |||
390 | gim.ParentEstateID = ParentEstateID; | 391 | gim.ParentEstateID = ParentEstateID; |
391 | gim.Position = Position; | 392 | gim.Position = Position; |
392 | gim.binaryBucket = binaryBucket; | 393 | gim.binaryBucket = binaryBucket; |
394 | gim.ID = imID.Guid; | ||
393 | 395 | ||
394 | 396 | ||
395 | // Trigger the Instant message in the scene. | 397 | // Trigger the Instant message in the scene. |
@@ -508,7 +510,6 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage | |||
508 | 510 | ||
509 | UUID toAgentID = new UUID(im.toAgentID); | 511 | UUID toAgentID = new UUID(im.toAgentID); |
510 | PresenceInfo upd = null; | 512 | PresenceInfo upd = null; |
511 | UUID regionID; | ||
512 | bool lookupAgent = false; | 513 | bool lookupAgent = false; |
513 | 514 | ||
514 | lock (m_UserRegionMap) | 515 | lock (m_UserRegionMap) |
@@ -701,6 +702,8 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage | |||
701 | gim["from_agent_session"] = UUID.Zero.ToString(); | 702 | gim["from_agent_session"] = UUID.Zero.ToString(); |
702 | gim["to_agent_id"] = msg.toAgentID.ToString(); | 703 | gim["to_agent_id"] = msg.toAgentID.ToString(); |
703 | gim["im_session_id"] = msg.imSessionID.ToString(); | 704 | gim["im_session_id"] = msg.imSessionID.ToString(); |
705 | if(msg.ID != Guid.Empty) | ||
706 | gim["id"] = msg.ID.ToString(); | ||
704 | gim["timestamp"] = msg.timestamp.ToString(); | 707 | gim["timestamp"] = msg.timestamp.ToString(); |
705 | gim["from_agent_name"] = msg.fromAgentName; | 708 | gim["from_agent_name"] = msg.fromAgentName; |
706 | gim["message"] = msg.message; | 709 | gim["message"] = msg.message; |