diff options
author | Teravus Ovares | 2008-05-05 15:53:11 +0000 |
---|---|---|
committer | Teravus Ovares | 2008-05-05 15:53:11 +0000 |
commit | ce19234dc865e645166dbe5cc52b6d8eb7c6d0af (patch) | |
tree | c84ebb52428d4c4db3305832a5bad5cb283164be /OpenSim/Region/Environment | |
parent | * A bit of spice from here, a pinch of salt from there, some brains that attr... (diff) | |
download | opensim-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')
-rw-r--r-- | OpenSim/Region/Environment/Modules/Avatar/Chat/ChatModule.cs | 30 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs | 3 |
2 files changed, 24 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 | } |
diff --git a/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs b/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs index dccc09a..b4a581d 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs | |||
@@ -53,6 +53,8 @@ namespace OpenSim.Region.Environment.Scenes | |||
53 | args.Channel = channel; | 53 | args.Channel = channel; |
54 | args.Type = type; | 54 | args.Type = type; |
55 | args.Position = fromPos; | 55 | args.Position = fromPos; |
56 | args.SenderUUID = fromAgentID; | ||
57 | |||
56 | 58 | ||
57 | ScenePresence user = GetScenePresence(fromAgentID); | 59 | ScenePresence user = GetScenePresence(fromAgentID); |
58 | if (user != null) | 60 | if (user != null) |
@@ -61,6 +63,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
61 | args.Sender = null; | 63 | args.Sender = null; |
62 | 64 | ||
63 | args.From = fromName; | 65 | args.From = fromName; |
66 | //args. | ||
64 | 67 | ||
65 | m_simChatModule.SimChat(this, args); | 68 | m_simChatModule.SimChat(this, args); |
66 | } | 69 | } |