aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ClientStack')
-rw-r--r--OpenSim/Region/ClientStack/ClientView.API.cs3
-rw-r--r--OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs6
2 files changed, 5 insertions, 4 deletions
diff --git a/OpenSim/Region/ClientStack/ClientView.API.cs b/OpenSim/Region/ClientStack/ClientView.API.cs
index 14e1b39..c8213fc 100644
--- a/OpenSim/Region/ClientStack/ClientView.API.cs
+++ b/OpenSim/Region/ClientStack/ClientView.API.cs
@@ -251,6 +251,7 @@ namespace OpenSim.Region.ClientStack
251 LLUUID imSessionID, string fromName, byte dialog, uint timeStamp) 251 LLUUID imSessionID, string fromName, byte dialog, uint timeStamp)
252 { 252 {
253 Encoding enc = Encoding.ASCII; 253 Encoding enc = Encoding.ASCII;
254 Encoding encUTF8 = Encoding.UTF8;
254 ImprovedInstantMessagePacket msg = new ImprovedInstantMessagePacket(); 255 ImprovedInstantMessagePacket msg = new ImprovedInstantMessagePacket();
255 msg.AgentData.AgentID = fromAgent; 256 msg.AgentData.AgentID = fromAgent;
256 msg.AgentData.SessionID = fromAgentSession; 257 msg.AgentData.SessionID = fromAgentSession;
@@ -264,7 +265,7 @@ namespace OpenSim.Region.ClientStack
264 msg.MessageBlock.RegionID = LLUUID.Random(); 265 msg.MessageBlock.RegionID = LLUUID.Random();
265 msg.MessageBlock.Timestamp = timeStamp; 266 msg.MessageBlock.Timestamp = timeStamp;
266 msg.MessageBlock.ToAgentID = toAgent; 267 msg.MessageBlock.ToAgentID = toAgent;
267 msg.MessageBlock.Message = enc.GetBytes(message + "\0"); 268 msg.MessageBlock.Message = encUTF8.GetBytes(message + "\0");
268 msg.MessageBlock.BinaryBucket = new byte[0]; 269 msg.MessageBlock.BinaryBucket = new byte[0];
269 270
270 OutPacket(msg); 271 OutPacket(msg);
diff --git a/OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs b/OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs
index 7a778e8..d285d21 100644
--- a/OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs
+++ b/OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs
@@ -83,7 +83,7 @@ namespace OpenSim.Region.ClientStack
83 break; 83 break;
84 case PacketType.ChatFromViewer: 84 case PacketType.ChatFromViewer:
85 ChatFromViewerPacket inchatpack = (ChatFromViewerPacket) Pack; 85 ChatFromViewerPacket inchatpack = (ChatFromViewerPacket) Pack;
86 if (Util.FieldToString(inchatpack.ChatData.Message) == "") 86 if (Helpers.FieldToUTF8String(inchatpack.ChatData.Message) == "")
87 { 87 {
88 //empty message so don't bother with it 88 //empty message so don't bother with it
89 break; 89 break;
@@ -101,7 +101,7 @@ namespace OpenSim.Region.ClientStack
101 ChatFromViewerArgs args = new ChatFromViewerArgs(); 101 ChatFromViewerArgs args = new ChatFromViewerArgs();
102 args.Channel = channel; 102 args.Channel = channel;
103 args.From = fromName; 103 args.From = fromName;
104 args.Message = Util.FieldToString(message); 104 args.Message = Helpers.FieldToUTF8String(message);
105 args.Type = (ChatTypeEnum) type; 105 args.Type = (ChatTypeEnum) type;
106 args.Position = fromPos; 106 args.Position = fromPos;
107 107
@@ -114,7 +114,7 @@ namespace OpenSim.Region.ClientStack
114 case PacketType.ImprovedInstantMessage: 114 case PacketType.ImprovedInstantMessage:
115 ImprovedInstantMessagePacket msgpack = (ImprovedInstantMessagePacket) Pack; 115 ImprovedInstantMessagePacket msgpack = (ImprovedInstantMessagePacket) Pack;
116 string IMfromName = Util.FieldToString(msgpack.MessageBlock.FromAgentName); 116 string IMfromName = Util.FieldToString(msgpack.MessageBlock.FromAgentName);
117 string IMmessage = Util.FieldToString(msgpack.MessageBlock.Message); 117 string IMmessage = Helpers.FieldToUTF8String(msgpack.MessageBlock.Message);
118 if (OnInstantMessage != null) 118 if (OnInstantMessage != null)
119 { 119 {
120 OnInstantMessage(msgpack.AgentData.AgentID, msgpack.AgentData.SessionID, 120 OnInstantMessage(msgpack.AgentData.AgentID, msgpack.AgentData.SessionID,