From 625041f1db90c5a7f917f52720199ee0088a3141 Mon Sep 17 00:00:00 2001 From: Melanie Date: Wed, 27 Jun 2012 00:10:51 +0200 Subject: Comment out a spammy message that will spew 4 lines for each request to a nonexistent URL for http-in --- OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/CoreModules') diff --git a/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs b/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs index f4cf6b4..a701b46 100644 --- a/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs +++ b/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs @@ -508,7 +508,8 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp } else { - m_log.Warn("[HttpRequestHandler]: http-in request failed; no such url: "+urlkey.ToString()); + //m_log.Warn("[HttpRequestHandler]: http-in request failed; no such url: "+urlkey.ToString()); + return; } //for llGetHttpHeader support we need to store original URI here -- cgit v1.1 From c87f0ac2261d1aa5226957aff63bfc8ac0efaffd Mon Sep 17 00:00:00 2001 From: Melanie Date: Thu, 28 Jun 2012 21:23:42 +0200 Subject: Fix llRegionSayTo the right way --- OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs | 11 +++++++++-- .../Scripting/WorldComm/WorldCommModule.cs | 19 ++++++++++++------- 2 files changed, 21 insertions(+), 9 deletions(-) (limited to 'OpenSim/Region/CoreModules') diff --git a/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs b/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs index 4d8fb90..357c2af 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 UUID fromID = UUID.Zero; string message = c.Message; IScene scene = c.Scene; + UUID destination = c.Destination; Vector3 fromPos = c.Position; Vector3 regionPos = new Vector3(scene.RegionInfo.RegionLocX * Constants.RegionSize, scene.RegionInfo.RegionLocY * Constants.RegionSize, 0); @@ -222,6 +223,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat { fromNamePrefix = m_adminPrefix; } + destination = UUID.Zero; // Avatars cant "SayTo" break; case ChatSourceType.Object: @@ -244,9 +246,13 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat { // This should use ForEachClient, but clients don't have a position. // If camera is moved into client, then camera position can be used + // MT: No, it can't, as chat is heard from the avatar position, not + // the camera position. s.ForEachRootScenePresence( delegate(ScenePresence presence) { + if (destination != UUID.Zero && presence.UUID != destination) + return; ILandObject Presencecheck = s.LandChannel.GetLandObject(presence.AbsolutePosition.X, presence.AbsolutePosition.Y); if (Presencecheck != null) { @@ -346,8 +352,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat UUID fromAgentID, string fromName, ChatTypeEnum type, string message, ChatSourceType src) { - // don't send stuff to child agents - if (presence.IsChildAgent) return false; + // don't send llRegionSay to child agents. Send normal chat because you + // can't talk across sim borders if it's not done + if (type == ChatTypeEnum.Broadcast && presence.IsChildAgent) return false; Vector3 fromRegionPos = fromPos + regionPos; Vector3 toRegionPos = presence.AbsolutePosition + 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 // private static readonly ILog m_log = // LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); + private const int DEBUG_CHANNEL = 2147483647; + private ListenerManager m_listenerManager; private Queue m_pending; private Queue m_pendingQ; @@ -311,6 +313,10 @@ namespace OpenSim.Region.CoreModules.Scripting.WorldComm public bool DeliverMessageTo(UUID target, int channel, Vector3 pos, string name, UUID id, string msg, out string error) { error = null; + + if (channel == DEBUG_CHANNEL) + return true; + // Is id an avatar? ScenePresence sp = m_scene.GetScenePresence(target); @@ -319,7 +325,9 @@ namespace OpenSim.Region.CoreModules.Scripting.WorldComm // Send message to avatar if (channel == 0) { - m_scene.SimChatBroadcast(Utils.StringToBytes(msg), ChatTypeEnum.Broadcast, 0, pos, name, id, false); + // Channel 0 goes to viewer ONLY + m_scene.SimChat(Utils.StringToBytes(msg), ChatTypeEnum.Broadcast, 0, pos, name, id, false, false, target); + return true; } List attachments = sp.GetAttachments(); @@ -351,12 +359,9 @@ namespace OpenSim.Region.CoreModules.Scripting.WorldComm return true; } - // Need to toss an error here - if (channel == 0) - { - error = "Cannot use llRegionSayTo to message objects on channel 0"; - return false; - } + SceneObjectPart part = m_scene.GetSceneObjectPart(target); + if (part == null) // Not even an object + return true; // No error foreach (ListenerInfo li in m_listenerManager.GetListeners(UUID.Zero, channel, name, id, msg)) { -- cgit v1.1