diff options
author | UbitUmarov | 2016-07-24 15:17:25 +0100 |
---|---|---|
committer | UbitUmarov | 2016-07-24 15:17:25 +0100 |
commit | bf604c85c66dd3bed06e3103cdf210ede02c151f (patch) | |
tree | ca4bbbeea4336bc971fc7c2ffbebfbbeb7e3f929 /OpenSim/Region | |
parent | do not send IMs via child agents (diff) | |
download | opensim-SC-bf604c85c66dd3bed06e3103cdf210ede02c151f.zip opensim-SC-bf604c85c66dd3bed06e3103cdf210ede02c151f.tar.gz opensim-SC-bf604c85c66dd3bed06e3103cdf210ede02c151f.tar.bz2 opensim-SC-bf604c85c66dd3bed06e3103cdf210ede02c151f.tar.xz |
add missing IM parameter ( needs fix where it is really relevant )
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | 8 | ||||
-rw-r--r-- | OpenSim/Region/CoreModules/Avatar/InstantMessage/MessageTransferModule.cs | 7 |
2 files changed, 7 insertions, 8 deletions
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; |