diff options
Diffstat (limited to 'OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs')
-rw-r--r-- | OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs b/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs index 5164289..53800bb 100644 --- a/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs | |||
@@ -69,7 +69,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat | |||
69 | m_enabled = false; | 69 | m_enabled = false; |
70 | return; | 70 | return; |
71 | } | 71 | } |
72 | 72 | ||
73 | m_whisperdistance = m_config.GetInt("whisper_distance", m_whisperdistance); | 73 | m_whisperdistance = m_config.GetInt("whisper_distance", m_whisperdistance); |
74 | m_saydistance = m_config.GetInt("say_distance", m_saydistance); | 74 | m_saydistance = m_config.GetInt("say_distance", m_saydistance); |
75 | m_shoutdistance = m_config.GetInt("shout_distance", m_shoutdistance); | 75 | m_shoutdistance = m_config.GetInt("shout_distance", m_shoutdistance); |
@@ -123,7 +123,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat | |||
123 | } | 123 | } |
124 | } | 124 | } |
125 | } | 125 | } |
126 | 126 | ||
127 | public virtual void Close() | 127 | public virtual void Close() |
128 | { | 128 | { |
129 | } | 129 | } |
@@ -132,7 +132,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat | |||
132 | { | 132 | { |
133 | } | 133 | } |
134 | 134 | ||
135 | public virtual Type ReplaceableInterface | 135 | public virtual Type ReplaceableInterface |
136 | { | 136 | { |
137 | get { return null; } | 137 | get { return null; } |
138 | } | 138 | } |
@@ -222,7 +222,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat | |||
222 | return; | 222 | return; |
223 | } | 223 | } |
224 | 224 | ||
225 | switch (sourceType) | 225 | switch (sourceType) |
226 | { | 226 | { |
227 | case ChatSourceType.Agent: | 227 | case ChatSourceType.Agent: |
228 | ScenePresence avatar = (scene as Scene).GetScenePresence(c.Sender.AgentId); | 228 | ScenePresence avatar = (scene as Scene).GetScenePresence(c.Sender.AgentId); |
@@ -240,7 +240,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat | |||
240 | } | 240 | } |
241 | destination = UUID.Zero; // Avatars cant "SayTo" | 241 | destination = UUID.Zero; // Avatars cant "SayTo" |
242 | ownerID = c.Sender.AgentId; | 242 | ownerID = c.Sender.AgentId; |
243 | 243 | ||
244 | hidePos = fromPos; | 244 | hidePos = fromPos; |
245 | break; | 245 | break; |
246 | 246 | ||
@@ -264,7 +264,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat | |||
264 | message = message.Substring(0, 1000); | 264 | message = message.Substring(0, 1000); |
265 | 265 | ||
266 | // m_log.DebugFormat( | 266 | // m_log.DebugFormat( |
267 | // "[CHAT]: DCTA: fromID {0} fromName {1}, region{2}, cType {3}, sType {4}", | 267 | // "[CHAT]: DCTA: fromID {0} fromName {1}, region{2}, cType {3}, sType {4}", |
268 | // fromID, fromName, scene.RegionInfo.RegionName, c.Type, sourceType); | 268 | // fromID, fromName, scene.RegionInfo.RegionName, c.Type, sourceType); |
269 | 269 | ||
270 | HashSet<UUID> receiverIDs = new HashSet<UUID>(); | 270 | HashSet<UUID> receiverIDs = new HashSet<UUID>(); |
@@ -317,13 +317,13 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat | |||
317 | } | 317 | } |
318 | } | 318 | } |
319 | }); | 319 | }); |
320 | 320 | ||
321 | scene.EventManager.TriggerOnChatToClients( | 321 | scene.EventManager.TriggerOnChatToClients( |
322 | fromID, receiverIDs, message, c.Type, fromPos, fromName, sourceType, ChatAudibleLevel.Fully); | 322 | fromID, receiverIDs, message, c.Type, fromPos, fromName, sourceType, ChatAudibleLevel.Fully); |
323 | } | 323 | } |
324 | 324 | ||
325 | static protected Vector3 CenterOfRegion = new Vector3(128, 128, 30); | 325 | static protected Vector3 CenterOfRegion = new Vector3(128, 128, 30); |
326 | 326 | ||
327 | public virtual void OnChatBroadcast(Object sender, OSChatMessage c) | 327 | public virtual void OnChatBroadcast(Object sender, OSChatMessage c) |
328 | { | 328 | { |
329 | if (c.Channel != 0 && c.Channel != DEBUG_CHANNEL) return; | 329 | if (c.Channel != 0 && c.Channel != DEBUG_CHANNEL) return; |
@@ -341,7 +341,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat | |||
341 | // broadcast chat works by redistributing every incoming chat | 341 | // broadcast chat works by redistributing every incoming chat |
342 | // message to each avatar in the scene. | 342 | // message to each avatar in the scene. |
343 | string fromName = c.From; | 343 | string fromName = c.From; |
344 | 344 | ||
345 | UUID fromID = UUID.Zero; | 345 | UUID fromID = UUID.Zero; |
346 | UUID ownerID = UUID.Zero; | 346 | UUID ownerID = UUID.Zero; |
347 | ChatSourceType sourceType = ChatSourceType.Object; | 347 | ChatSourceType sourceType = ChatSourceType.Object; |
@@ -353,15 +353,15 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat | |||
353 | ownerID = c.Sender.AgentId; | 353 | ownerID = c.Sender.AgentId; |
354 | sourceType = ChatSourceType.Agent; | 354 | sourceType = ChatSourceType.Agent; |
355 | } | 355 | } |
356 | else if (c.SenderUUID != UUID.Zero) | 356 | else if (c.SenderUUID != UUID.Zero) |
357 | { | 357 | { |
358 | fromID = c.SenderUUID; | 358 | fromID = c.SenderUUID; |
359 | ownerID = ((SceneObjectPart)c.SenderObject).OwnerID; | 359 | ownerID = ((SceneObjectPart)c.SenderObject).OwnerID; |
360 | } | 360 | } |
361 | 361 | ||
362 | // m_log.DebugFormat("[CHAT] Broadcast: fromID {0} fromName {1}, cType {2}, sType {3}", fromID, fromName, cType, sourceType); | 362 | // m_log.DebugFormat("[CHAT] Broadcast: fromID {0} fromName {1}, cType {2}, sType {3}", fromID, fromName, cType, sourceType); |
363 | HashSet<UUID> receiverIDs = new HashSet<UUID>(); | 363 | HashSet<UUID> receiverIDs = new HashSet<UUID>(); |
364 | 364 | ||
365 | if (c.Scene != null) | 365 | if (c.Scene != null) |
366 | { | 366 | { |
367 | ((Scene)c.Scene).ForEachRootClient | 367 | ((Scene)c.Scene).ForEachRootClient |
@@ -374,7 +374,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat | |||
374 | (null != c.SenderObject) && | 374 | (null != c.SenderObject) && |
375 | (((SceneObjectPart)c.SenderObject).OwnerID != client.AgentId)) | 375 | (((SceneObjectPart)c.SenderObject).OwnerID != client.AgentId)) |
376 | return; | 376 | return; |
377 | 377 | ||
378 | client.SendChatMessage(c.Message, (byte)cType, CenterOfRegion, fromName, fromID, fromID, | 378 | client.SendChatMessage(c.Message, (byte)cType, CenterOfRegion, fromName, fromID, fromID, |
379 | (byte)sourceType, (byte)ChatAudibleLevel.Fully); | 379 | (byte)sourceType, (byte)ChatAudibleLevel.Fully); |
380 | receiverIDs.Add(client.AgentId); | 380 | receiverIDs.Add(client.AgentId); |
@@ -400,7 +400,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat | |||
400 | /// <param name="type"></param> | 400 | /// <param name="type"></param> |
401 | /// <param name="message"></param> | 401 | /// <param name="message"></param> |
402 | /// <param name="src"></param> | 402 | /// <param name="src"></param> |
403 | /// <returns>true if the message was sent to the receiver, false if it was not sent due to failing a | 403 | /// <returns>true if the message was sent to the receiver, false if it was not sent due to failing a |
404 | /// precondition</returns> | 404 | /// precondition</returns> |
405 | protected virtual bool TrySendChatMessage( | 405 | protected virtual bool TrySendChatMessage( |
406 | ScenePresence presence, Vector3 fromPos, Vector3 regionPos, | 406 | ScenePresence presence, Vector3 fromPos, Vector3 regionPos, |
@@ -430,7 +430,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat | |||
430 | presence.ControllingClient.SendChatMessage( | 430 | presence.ControllingClient.SendChatMessage( |
431 | message, (byte) type, fromPos, fromName, | 431 | message, (byte) type, fromPos, fromName, |
432 | fromAgentID, ownerID, (byte)src, (byte)ChatAudibleLevel.Fully); | 432 | fromAgentID, ownerID, (byte)src, (byte)ChatAudibleLevel.Fully); |
433 | 433 | ||
434 | return true; | 434 | return true; |
435 | } | 435 | } |
436 | 436 | ||