From 5e4d6cab00cb29cd088ab7b62ab13aff103b64cb Mon Sep 17 00:00:00 2001 From: onefang Date: Sun, 19 May 2019 21:24:15 +1000 Subject: Dump OpenSim 0.9.0.1 into it's own branch. --- .../Region/CoreModules/Avatar/Lure/HGLureModule.cs | 6 ++--- .../Region/CoreModules/Avatar/Lure/LureModule.cs | 30 ++++++++++++++++------ 2 files changed, 25 insertions(+), 11 deletions(-) (limited to 'OpenSim/Region/CoreModules/Avatar/Lure') diff --git a/OpenSim/Region/CoreModules/Avatar/Lure/HGLureModule.cs b/OpenSim/Region/CoreModules/Avatar/Lure/HGLureModule.cs index 24286a4..10781e9 100644 --- a/OpenSim/Region/CoreModules/Avatar/Lure/HGLureModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Lure/HGLureModule.cs @@ -65,7 +65,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Lure { m_Enabled = true; - m_ThisGridURL = Util.GetConfigVarFromSections(config, "GatekeeperURI", + m_ThisGridURL = Util.GetConfigVarFromSections(config, "GatekeeperURI", new string[] { "Startup", "Hypergrid", "Messaging" }, String.Empty); // Legacy. Remove soon! m_ThisGridURL = config.Configs["Messaging"].GetString("Gatekeeper", m_ThisGridURL); @@ -154,7 +154,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Lure void OnIncomingInstantMessage(GridInstantMessage im) { - if (im.dialog == (byte)InstantMessageDialog.RequestTeleport + if (im.dialog == (byte)InstantMessageDialog.RequestTeleport || im.dialog == (byte)InstantMessageDialog.GodLikeRequestTeleport) { UUID sessionID = new UUID(im.imSessionID); @@ -195,7 +195,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Lure 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) { m_TransferModule.SendInstantMessage(m, diff --git a/OpenSim/Region/CoreModules/Avatar/Lure/LureModule.cs b/OpenSim/Region/CoreModules/Avatar/Lure/LureModule.cs index 465ffbc..6f79676 100644 --- a/OpenSim/Region/CoreModules/Avatar/Lure/LureModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Lure/LureModule.cs @@ -163,16 +163,29 @@ namespace OpenSim.Region.CoreModules.Avatar.Lure scene.RegionInfo.RegionHandle, (uint)presence.AbsolutePosition.X, (uint)presence.AbsolutePosition.Y, - (uint)Math.Ceiling(presence.AbsolutePosition.Z)); + (uint)presence.AbsolutePosition.Z + 2); m_log.DebugFormat("[LURE MODULE]: TP invite with message {0}, type {1}", message, lureType); - GridInstantMessage m = new GridInstantMessage(scene, client.AgentId, - client.FirstName+" "+client.LastName, targetid, - (byte)InstantMessageDialog.RequestTeleport, false, - message, dest, false, presence.AbsolutePosition, - new Byte[0], true); - + GridInstantMessage m; + + if (scene.Permissions.IsAdministrator(client.AgentId) && presence.IsViewerUIGod && (!scene.Permissions.IsAdministrator(targetid))) + { + m = new GridInstantMessage(scene, client.AgentId, + client.FirstName+" "+client.LastName, targetid, + (byte)InstantMessageDialog.GodLikeRequestTeleport, false, + message, dest, false, presence.AbsolutePosition, + new Byte[0], true); + } + else + { + m = new GridInstantMessage(scene, client.AgentId, + client.FirstName+" "+client.LastName, targetid, + (byte)InstantMessageDialog.RequestTeleport, false, + message, dest, false, presence.AbsolutePosition, + new Byte[0], true); + } + if (m_TransferModule != null) { m_TransferModule.SendInstantMessage(m, @@ -207,7 +220,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Lure { // Forward remote teleport requests // - if (msg.dialog != 22) + if (msg.dialog != (byte)InstantMessageDialog.RequestTeleport && + msg.dialog != (byte)InstantMessageDialog.GodLikeRequestTeleport) return; if (m_TransferModule != null) -- cgit v1.1