aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules
diff options
context:
space:
mode:
authorMelanie2012-06-29 22:11:49 +0100
committerMelanie2012-06-29 22:11:49 +0100
commit05cf51cbbdb3f33bb4c532eefc24eb0a194ed378 (patch)
tree5514845e589587a84a621bb6e576136d4869ad29 /OpenSim/Region/CoreModules
parentRevert "Mantis 5977 Corrections to llRegionSayTo" (diff)
parentFix llRegionSayTo the right way (diff)
downloadopensim-SC_OLD-05cf51cbbdb3f33bb4c532eefc24eb0a194ed378.zip
opensim-SC_OLD-05cf51cbbdb3f33bb4c532eefc24eb0a194ed378.tar.gz
opensim-SC_OLD-05cf51cbbdb3f33bb4c532eefc24eb0a194ed378.tar.bz2
opensim-SC_OLD-05cf51cbbdb3f33bb4c532eefc24eb0a194ed378.tar.xz
Merge branch 'avination' into careminster
Conflicts: OpenSim/Framework/Servers/HttpServer/PollServiceWorkerThread.cs
Diffstat (limited to 'OpenSim/Region/CoreModules')
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs11
-rw-r--r--OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs3
-rw-r--r--OpenSim/Region/CoreModules/Scripting/WorldComm/WorldCommModule.cs19
3 files changed, 23 insertions, 10 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs b/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs
index 5649855..bc42fd1 100644
--- a/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs
@@ -199,6 +199,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat
199 UUID fromID = UUID.Zero; 199 UUID fromID = UUID.Zero;
200 string message = c.Message; 200 string message = c.Message;
201 IScene scene = c.Scene; 201 IScene scene = c.Scene;
202 UUID destination = c.Destination;
202 Vector3 fromPos = c.Position; 203 Vector3 fromPos = c.Position;
203 Vector3 regionPos = new Vector3(scene.RegionInfo.RegionLocX * Constants.RegionSize, 204 Vector3 regionPos = new Vector3(scene.RegionInfo.RegionLocX * Constants.RegionSize,
204 scene.RegionInfo.RegionLocY * Constants.RegionSize, 0); 205 scene.RegionInfo.RegionLocY * Constants.RegionSize, 0);
@@ -222,6 +223,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat
222 { 223 {
223 fromNamePrefix = m_adminPrefix; 224 fromNamePrefix = m_adminPrefix;
224 } 225 }
226 destination = UUID.Zero; // Avatars cant "SayTo"
225 break; 227 break;
226 228
227 case ChatSourceType.Object: 229 case ChatSourceType.Object:
@@ -244,9 +246,13 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat
244 { 246 {
245 // This should use ForEachClient, but clients don't have a position. 247 // This should use ForEachClient, but clients don't have a position.
246 // If camera is moved into client, then camera position can be used 248 // If camera is moved into client, then camera position can be used
249 // MT: No, it can't, as chat is heard from the avatar position, not
250 // the camera position.
247 s.ForEachRootScenePresence( 251 s.ForEachRootScenePresence(
248 delegate(ScenePresence presence) 252 delegate(ScenePresence presence)
249 { 253 {
254 if (destination != UUID.Zero && presence.UUID != destination)
255 return;
250 ILandObject Presencecheck = s.LandChannel.GetLandObject(presence.AbsolutePosition.X, presence.AbsolutePosition.Y); 256 ILandObject Presencecheck = s.LandChannel.GetLandObject(presence.AbsolutePosition.X, presence.AbsolutePosition.Y);
251 if (Presencecheck != null) 257 if (Presencecheck != null)
252 { 258 {
@@ -345,8 +351,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat
345 UUID fromAgentID, string fromName, ChatTypeEnum type, 351 UUID fromAgentID, string fromName, ChatTypeEnum type,
346 string message, ChatSourceType src) 352 string message, ChatSourceType src)
347 { 353 {
348 // don't send stuff to child agents 354 // don't send llRegionSay to child agents. Send normal chat because you
349 if (presence.IsChildAgent) return false; 355 // can't talk across sim borders if it's not done
356 if (type == ChatTypeEnum.Broadcast && presence.IsChildAgent) return false;
350 357
351 Vector3 fromRegionPos = fromPos + regionPos; 358 Vector3 fromRegionPos = fromPos + regionPos;
352 Vector3 toRegionPos = presence.AbsolutePosition + 359 Vector3 toRegionPos = presence.AbsolutePosition +
diff --git a/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs b/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs
index 56c3c7d..192b4f6 100644
--- a/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs
+++ b/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs
@@ -532,7 +532,8 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp
532 } 532 }
533 else 533 else
534 { 534 {
535 m_log.Warn("[HttpRequestHandler]: http-in request failed; no such url: "+urlkey.ToString()); 535 //m_log.Warn("[HttpRequestHandler]: http-in request failed; no such url: "+urlkey.ToString());
536 return;
536 } 537 }
537 538
538 //for llGetHttpHeader support we need to store original URI here 539 //for llGetHttpHeader support we need to store original URI here
diff --git a/OpenSim/Region/CoreModules/Scripting/WorldComm/WorldCommModule.cs b/OpenSim/Region/CoreModules/Scripting/WorldComm/WorldCommModule.cs
index 176c86d..07bb291 100644
--- a/OpenSim/Region/CoreModules/Scripting/WorldComm/WorldCommModule.cs
+++ b/OpenSim/Region/CoreModules/Scripting/WorldComm/WorldCommModule.cs
@@ -90,6 +90,8 @@ namespace OpenSim.Region.CoreModules.Scripting.WorldComm
90 // private static readonly ILog m_log = 90 // private static readonly ILog m_log =
91 // LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 91 // LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
92 92
93 private const int DEBUG_CHANNEL = 2147483647;
94
93 private ListenerManager m_listenerManager; 95 private ListenerManager m_listenerManager;
94 private Queue m_pending; 96 private Queue m_pending;
95 private Queue m_pendingQ; 97 private Queue m_pendingQ;
@@ -311,6 +313,10 @@ namespace OpenSim.Region.CoreModules.Scripting.WorldComm
311 public bool DeliverMessageTo(UUID target, int channel, Vector3 pos, string name, UUID id, string msg, out string error) 313 public bool DeliverMessageTo(UUID target, int channel, Vector3 pos, string name, UUID id, string msg, out string error)
312 { 314 {
313 error = null; 315 error = null;
316
317 if (channel == DEBUG_CHANNEL)
318 return true;
319
314 // Is id an avatar? 320 // Is id an avatar?
315 ScenePresence sp = m_scene.GetScenePresence(target); 321 ScenePresence sp = m_scene.GetScenePresence(target);
316 322
@@ -319,7 +325,9 @@ namespace OpenSim.Region.CoreModules.Scripting.WorldComm
319 // Send message to avatar 325 // Send message to avatar
320 if (channel == 0) 326 if (channel == 0)
321 { 327 {
322 m_scene.SimChatBroadcast(Utils.StringToBytes(msg), ChatTypeEnum.Broadcast, 0, pos, name, id, false); 328 // Channel 0 goes to viewer ONLY
329 m_scene.SimChat(Utils.StringToBytes(msg), ChatTypeEnum.Broadcast, 0, pos, name, id, false, false, target);
330 return true;
323 } 331 }
324 332
325 List<SceneObjectGroup> attachments = sp.GetAttachments(); 333 List<SceneObjectGroup> attachments = sp.GetAttachments();
@@ -351,12 +359,9 @@ namespace OpenSim.Region.CoreModules.Scripting.WorldComm
351 return true; 359 return true;
352 } 360 }
353 361
354 // Need to toss an error here 362 SceneObjectPart part = m_scene.GetSceneObjectPart(target);
355 if (channel == 0) 363 if (part == null) // Not even an object
356 { 364 return true; // No error
357 error = "Cannot use llRegionSayTo to message objects on channel 0";
358 return false;
359 }
360 365
361 foreach (ListenerInfo li in m_listenerManager.GetListeners(UUID.Zero, channel, name, id, msg)) 366 foreach (ListenerInfo li in m_listenerManager.GetListeners(UUID.Zero, channel, name, id, msg))
362 { 367 {