aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack/ClientView.API.cs
diff options
context:
space:
mode:
authorMW2007-07-12 15:16:19 +0000
committerMW2007-07-12 15:16:19 +0000
commit20a77a6d4b05ee15b7b04a81920d19462e6e542a (patch)
tree93c10bd7724a62ccb3bec9697439e0db42fcd281 /OpenSim/Region/ClientStack/ClientView.API.cs
parentCleaning up some of the CAPS functions, Asset uploads now use the new LLSDStr... (diff)
downloadopensim-SC_OLD-20a77a6d4b05ee15b7b04a81920d19462e6e542a.zip
opensim-SC_OLD-20a77a6d4b05ee15b7b04a81920d19462e6e542a.tar.gz
opensim-SC_OLD-20a77a6d4b05ee15b7b04a81920d19462e6e542a.tar.bz2
opensim-SC_OLD-20a77a6d4b05ee15b7b04a81920d19462e6e542a.tar.xz
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.cs38
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>