aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Modules/Avatar/Chat
diff options
context:
space:
mode:
authorTeravus Ovares2008-05-05 15:53:11 +0000
committerTeravus Ovares2008-05-05 15:53:11 +0000
commitce19234dc865e645166dbe5cc52b6d8eb7c6d0af (patch)
treec84ebb52428d4c4db3305832a5bad5cb283164be /OpenSim/Region/Environment/Modules/Avatar/Chat
parent* A bit of spice from here, a pinch of salt from there, some brains that attr... (diff)
downloadopensim-SC-ce19234dc865e645166dbe5cc52b6d8eb7c6d0af.zip
opensim-SC-ce19234dc865e645166dbe5cc52b6d8eb7c6d0af.tar.gz
opensim-SC-ce19234dc865e645166dbe5cc52b6d8eb7c6d0af.tar.bz2
opensim-SC-ce19234dc865e645166dbe5cc52b6d8eb7c6d0af.tar.xz
* Unraveled the DEBUG_CHANNEL mystery.
* Moved script errors to the debug channel. * Typing '/2147483647 OK' results in a debug_channel message. * Expanded the available parameters that are send-able through IClientAPI
Diffstat (limited to 'OpenSim/Region/Environment/Modules/Avatar/Chat')
-rw-r--r--OpenSim/Region/Environment/Modules/Avatar/Chat/ChatModule.cs30
1 files changed, 21 insertions, 9 deletions
diff --git a/OpenSim/Region/Environment/Modules/Avatar/Chat/ChatModule.cs b/OpenSim/Region/Environment/Modules/Avatar/Chat/ChatModule.cs
index 15720fc..9f3429e 100644
--- a/OpenSim/Region/Environment/Modules/Avatar/Chat/ChatModule.cs
+++ b/OpenSim/Region/Environment/Modules/Avatar/Chat/ChatModule.cs
@@ -168,7 +168,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat
168 168
169 string fromName = e.From; 169 string fromName = e.From;
170 string message = e.Message; 170 string message = e.Message;
171 LLUUID fromAgentID = LLUUID.Zero; 171 LLUUID fromAgentID = e.SenderUUID;
172 172
173 if (e.Sender != null) 173 if (e.Sender != null)
174 { 174 {
@@ -208,10 +208,13 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat
208 208
209 209
210 // We only want to relay stuff on channel 0 210 // We only want to relay stuff on channel 0
211 if (e.Channel == 0) 211 if (e.Channel == 0 || e.Channel == 2147483647)
212 { 212 {
213 if (e.Channel == 2147483647)
214 e.Type = ChatTypeEnum.DebugChannel;
215
213 // IRC stuff 216 // IRC stuff
214 if (e.Message.Length > 0) 217 if (e.Message.Length > 0 && e.Channel == 0)
215 { 218 {
216 if (m_irc.Connected && (avatar != null)) // this is to keep objects from talking to IRC 219 if (m_irc.Connected && (avatar != null)) // this is to keep objects from talking to IRC
217 { 220 {
@@ -223,8 +226,17 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat
223 { 226 {
224 s.ForEachScenePresence(delegate(ScenePresence presence) 227 s.ForEachScenePresence(delegate(ScenePresence presence)
225 { 228 {
226 TrySendChatMessage(presence, fromPos, regionPos, 229 if (e.Channel == 2147483647)
227 fromAgentID, fromName, e.Type, message); 230 {
231 TrySendChatMessage(presence, fromPos, regionPos,
232 fromAgentID, fromName, e.Type, message, ChatSourceType.Object);
233 }
234 else
235 {
236 TrySendChatMessage(presence, fromPos, regionPos,
237 fromAgentID, fromName, e.Type, message, ChatSourceType.Agent);
238
239 }
228 }); 240 });
229 } 241 }
230 } 242 }
@@ -290,7 +302,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat
290 } 302 }
291 303
292 private void TrySendChatMessage(ScenePresence presence, LLVector3 fromPos, LLVector3 regionPos, 304 private void TrySendChatMessage(ScenePresence presence, LLVector3 fromPos, LLVector3 regionPos,
293 LLUUID fromAgentID, string fromName, ChatTypeEnum type, string message) 305 LLUUID fromAgentID, string fromName, ChatTypeEnum type, string message, ChatSourceType src)
294 { 306 {
295 if (!presence.IsChildAgent) 307 if (!presence.IsChildAgent)
296 { 308 {
@@ -306,7 +318,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat
306 } 318 }
307 319
308 // TODO: should change so the message is sent through the avatar rather than direct to the ClientView 320 // TODO: should change so the message is sent through the avatar rather than direct to the ClientView
309 presence.ControllingClient.SendChatMessage(message, (byte) type, fromPos, fromName, fromAgentID); 321 presence.ControllingClient.SendChatMessage(message, (byte) type, fromPos, fromName, fromAgentID,(byte)src,(byte)ChatAudibleLevel.Fully);
310 } 322 }
311 } 323 }
312 324
@@ -633,7 +645,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat
633 avatar.ControllingClient.SendChatMessage( 645 avatar.ControllingClient.SendChatMessage(
634 Helpers.StringToField(data["msg"]), 255, 646 Helpers.StringToField(data["msg"]), 255,
635 pos, data["nick"], 647 pos, data["nick"],
636 LLUUID.Zero); 648 LLUUID.Zero,(byte)ChatSourceType.Agent,(byte)ChatAudibleLevel.Fully);
637 } 649 }
638 }); 650 });
639 } 651 }
@@ -678,7 +690,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat
678 avatar.ControllingClient.SendChatMessage( 690 avatar.ControllingClient.SendChatMessage(
679 Helpers.StringToField(message), 255, 691 Helpers.StringToField(message), 255,
680 pos, sender, 692 pos, sender,
681 LLUUID.Zero); 693 LLUUID.Zero,(byte)ChatSourceType.Object,(byte)ChatAudibleLevel.Fully);
682 } 694 }
683 }); 695 });
684 } 696 }