diff options
Diffstat (limited to 'src/OpenSimClient.cs')
-rw-r--r-- | src/OpenSimClient.cs | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/src/OpenSimClient.cs b/src/OpenSimClient.cs index 696031d..2e8dbb5 100644 --- a/src/OpenSimClient.cs +++ b/src/OpenSimClient.cs | |||
@@ -169,7 +169,28 @@ namespace OpenSim | |||
169 | case PacketType.AgentUpdate: | 169 | case PacketType.AgentUpdate: |
170 | ClientAvatar.HandleAgentUpdate((AgentUpdatePacket)Pack); | 170 | ClientAvatar.HandleAgentUpdate((AgentUpdatePacket)Pack); |
171 | break; | 171 | break; |
172 | } | 172 | case PacketType.ChatFromViewer: |
173 | ChatFromViewerPacket inchatpack = (ChatFromViewerPacket)Pack; | ||
174 | if(Helpers.FieldToString(inchatpack.ChatData.Message)=="") break; | ||
175 | |||
176 | System.Text.Encoding _enc = System.Text.Encoding.ASCII; | ||
177 | libsecondlife.Packets.ChatFromSimulatorPacket reply = new ChatFromSimulatorPacket(); | ||
178 | reply.ChatData.Audible = 1; | ||
179 | reply.ChatData.Message = inchatpack.ChatData.Message; | ||
180 | reply.ChatData.ChatType = 1; | ||
181 | reply.ChatData.SourceType = 1; | ||
182 | reply.ChatData.Position = this.ClientAvatar.position; | ||
183 | reply.ChatData.FromName = _enc.GetBytes(this.ClientAvatar.firstname + " " + this.ClientAvatar.lastname + "\0"); | ||
184 | reply.ChatData.OwnerID = this.AgentID; | ||
185 | reply.ChatData.SourceID = this.AgentID; | ||
186 | |||
187 | |||
188 | |||
189 | foreach(OpenSimClient client in OpenSim_Main.sim.ClientThreads.Values) { | ||
190 | client.OutPacket(reply); | ||
191 | } | ||
192 | break; | ||
193 | } | ||
173 | } | 194 | } |
174 | 195 | ||
175 | private void ResendUnacked() | 196 | private void ResendUnacked() |