Merge commit '3ccb58c05c0a11fb4cff0f3adf90ca29d67b0c8b' into bigmerge

avinationmerge
Melanie 2011-10-11 22:43:27 +01:00
commit 75fd256ef8
2 changed files with 18 additions and 9 deletions

View File

@ -24,6 +24,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
using System; using System;
using System.Collections; using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
@ -145,14 +146,14 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
scene.Entities[toAgentID] is ScenePresence) scene.Entities[toAgentID] is ScenePresence)
{ {
// m_log.DebugFormat( // m_log.DebugFormat(
// "[INSTANT MESSAGE]: Looking for root agent {0} in {1}", // "[HG INSTANT MESSAGE]: Looking for root agent {0} in {1}",
// toAgentID.ToString(), scene.RegionInfo.RegionName); // toAgentID.ToString(), scene.RegionInfo.RegionName);
ScenePresence user = (ScenePresence) scene.Entities[toAgentID]; ScenePresence user = (ScenePresence) scene.Entities[toAgentID];
if (!user.IsChildAgent) if (!user.IsChildAgent)
{ {
// Local message // Local message
// m_log.DebugFormat("[INSTANT MESSAGE]: Delivering IM to root agent {0} {1}", user.Name, toAgentID); // m_log.DebugFormat("[HG INSTANT MESSAGE]: Delivering IM to root agent {0} {1}", user.Name, toAgentID);
user.ControllingClient.SendInstantMessage(im); user.ControllingClient.SendInstantMessage(im);
// Message sent // Message sent
@ -166,7 +167,7 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
foreach (Scene scene in m_Scenes) foreach (Scene scene in m_Scenes)
{ {
// m_log.DebugFormat( // m_log.DebugFormat(
// "[INSTANT MESSAGE]: Looking for child of {0} in {1}", toAgentID, scene.RegionInfo.RegionName); // "[HG INSTANT MESSAGE]: Looking for child of {0} in {1}", toAgentID, scene.RegionInfo.RegionName);
if (scene.Entities.ContainsKey(toAgentID) && if (scene.Entities.ContainsKey(toAgentID) &&
scene.Entities[toAgentID] is ScenePresence) scene.Entities[toAgentID] is ScenePresence)
@ -174,7 +175,7 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
// Local message // Local message
ScenePresence user = (ScenePresence) scene.Entities[toAgentID]; ScenePresence user = (ScenePresence) scene.Entities[toAgentID];
// m_log.DebugFormat("[INSTANT MESSAGE]: Delivering IM to child agent {0} {1}", user.Name, toAgentID); // m_log.DebugFormat("[HG INSTANT MESSAGE]: Delivering IM to child agent {0} {1}", user.Name, toAgentID);
user.ControllingClient.SendInstantMessage(im); user.ControllingClient.SendInstantMessage(im);
// Message sent // Message sent
@ -183,7 +184,7 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
} }
} }
// m_log.DebugFormat("[INSTANT MESSAGE]: Delivering IM to {0} via XMLRPC", im.toAgentID); // m_log.DebugFormat("[HG INSTANT MESSAGE]: Delivering IM to {0} via XMLRPC", im.toAgentID);
// Is the user a local user? // Is the user a local user?
UserAccount account = m_Scenes[0].UserAccountService.GetUserAccount(m_Scenes[0].RegionInfo.ScopeID, toAgentID); UserAccount account = m_Scenes[0].UserAccountService.GetUserAccount(m_Scenes[0].RegionInfo.ScopeID, toAgentID);
string url = string.Empty; string url = string.Empty;

View File

@ -154,14 +154,17 @@ namespace OpenSim.Region.CoreModules.Avatar.Lure
if (im.dialog == (byte)InstantMessageDialog.RequestTeleport) if (im.dialog == (byte)InstantMessageDialog.RequestTeleport)
{ {
UUID sessionID = new UUID(im.imSessionID); UUID sessionID = new UUID(im.imSessionID);
m_log.DebugFormat("[HG LURE MODULE]: RequestTeleport sessionID={0}, regionID={1}, message={2}", im.imSessionID, im.RegionID, im.message);
m_PendingLures.Add(sessionID, im, 7200); // 2 hours if (!m_PendingLures.Contains(sessionID))
{
m_log.DebugFormat("[HG LURE MODULE]: RequestTeleport sessionID={0}, regionID={1}, message={2}", im.imSessionID, im.RegionID, im.message);
m_PendingLures.Add(sessionID, im, 7200); // 2 hours
}
// Forward. We do this, because the IM module explicitly rejects // Forward. We do this, because the IM module explicitly rejects
// IMs of this type // IMs of this type
if (m_TransferModule != null) if (m_TransferModule != null)
m_TransferModule.SendInstantMessage(im, delegate(bool success) { }); m_TransferModule.SendInstantMessage(im, delegate(bool success) { });
} }
} }
@ -177,12 +180,17 @@ namespace OpenSim.Region.CoreModules.Avatar.Lure
m_log.DebugFormat("[HG LURE MODULE]: TP invite with message {0}", message); m_log.DebugFormat("[HG LURE MODULE]: TP invite with message {0}", message);
UUID sessionID = UUID.Random();
GridInstantMessage m = new GridInstantMessage(scene, client.AgentId, GridInstantMessage m = new GridInstantMessage(scene, client.AgentId,
client.FirstName+" "+client.LastName, targetid, client.FirstName+" "+client.LastName, targetid,
(byte)InstantMessageDialog.RequestTeleport, false, (byte)InstantMessageDialog.RequestTeleport, false,
message, UUID.Random(), false, presence.AbsolutePosition, message, sessionID, false, presence.AbsolutePosition,
new Byte[0]); new Byte[0]);
m.RegionID = client.Scene.RegionInfo.RegionID.Guid; m.RegionID = client.Scene.RegionInfo.RegionID.Guid;
m_log.DebugFormat("[HG LURE MODULE]: RequestTeleport sessionID={0}, regionID={1}, message={2}", m.imSessionID, m.RegionID, m.message);
m_PendingLures.Add(sessionID, m, 7200); // 2 hours
if (m_TransferModule != null) if (m_TransferModule != null)
{ {