diff options
Fixed a number of bugs in the local InstantMessage handling, sending InstantMessages will no longer crash the server. But they still aren't really working correctly, you can't type replies to received messages.
Diffstat (limited to 'OpenSim/Region/ClientStack/ClientView.API.cs')
-rw-r--r-- | OpenSim/Region/ClientStack/ClientView.API.cs | 38 |
1 files changed, 22 insertions, 16 deletions
diff --git a/OpenSim/Region/ClientStack/ClientView.API.cs b/OpenSim/Region/ClientStack/ClientView.API.cs index e88995f..5be82dd 100644 --- a/OpenSim/Region/ClientStack/ClientView.API.cs +++ b/OpenSim/Region/ClientStack/ClientView.API.cs | |||
@@ -245,23 +245,29 @@ namespace OpenSim.Region.ClientStack | |||
245 | /// <remarks>TODO</remarks> | 245 | /// <remarks>TODO</remarks> |
246 | /// <param name="message"></param> | 246 | /// <param name="message"></param> |
247 | /// <param name="target"></param> | 247 | /// <param name="target"></param> |
248 | public void SendInstantMessage(string message, LLUUID target) | 248 | public void SendInstantMessage(string message, LLUUID target, string fromName) |
249 | { | 249 | { |
250 | ImprovedInstantMessagePacket msg = new ImprovedInstantMessagePacket(); | 250 | if (message != "typing") |
251 | msg.AgentData.AgentID = this.AgentID; | 251 | { |
252 | msg.AgentData.SessionID = this.SessionID; | 252 | Encoding enc = Encoding.ASCII; |
253 | 253 | ImprovedInstantMessagePacket msg = new ImprovedInstantMessagePacket(); | |
254 | msg.MessageBlock.Dialog = 0; | 254 | msg.AgentData.AgentID = this.AgentID; |
255 | msg.MessageBlock.FromGroup = false; | 255 | msg.AgentData.SessionID = this.SessionID; |
256 | msg.MessageBlock.ID = target.Combine(this.AgentID); | 256 | msg.MessageBlock.FromAgentName = enc.GetBytes(fromName + " \0"); |
257 | msg.MessageBlock.Offline = 0; | 257 | msg.MessageBlock.Dialog = 0; |
258 | msg.MessageBlock.ParentEstateID = 0; | 258 | msg.MessageBlock.FromGroup = false; |
259 | msg.MessageBlock.Position = new LLVector3(); | 259 | msg.MessageBlock.ID = target.Combine(this.SecureSessionID); |
260 | msg.MessageBlock.RegionID = new LLUUID(); | 260 | msg.MessageBlock.Offline = 0; |
261 | msg.MessageBlock.Timestamp = 0; | 261 | msg.MessageBlock.ParentEstateID = 0; |
262 | msg.MessageBlock.ToAgentID = target; | 262 | msg.MessageBlock.Position = new LLVector3(); |
263 | 263 | msg.MessageBlock.RegionID = new LLUUID(); | |
264 | this.OutPacket(msg); | 264 | msg.MessageBlock.Timestamp = 0; |
265 | msg.MessageBlock.ToAgentID = target; | ||
266 | msg.MessageBlock.Message = enc.GetBytes(message + "\0"); | ||
267 | msg.MessageBlock.BinaryBucket = new byte[0]; | ||
268 | |||
269 | this.OutPacket(msg); | ||
270 | } | ||
265 | } | 271 | } |
266 | 272 | ||
267 | /// <summary> | 273 | /// <summary> |