diff options
Diffstat (limited to 'OpenSim/Region/CoreModules/Avatar/Lure')
-rw-r--r-- | OpenSim/Region/CoreModules/Avatar/Lure/HGLureModule.cs | 23 | ||||
-rw-r--r-- | OpenSim/Region/CoreModules/Avatar/Lure/LureModule.cs | 2 |
2 files changed, 21 insertions, 4 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Lure/HGLureModule.cs b/OpenSim/Region/CoreModules/Avatar/Lure/HGLureModule.cs index 232a4fe..24286a4 100644 --- a/OpenSim/Region/CoreModules/Avatar/Lure/HGLureModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Lure/HGLureModule.cs | |||
@@ -65,7 +65,10 @@ namespace OpenSim.Region.CoreModules.Avatar.Lure | |||
65 | { | 65 | { |
66 | m_Enabled = true; | 66 | m_Enabled = true; |
67 | 67 | ||
68 | m_ThisGridURL = config.Configs["Messaging"].GetString("Gatekeeper", string.Empty); | 68 | m_ThisGridURL = Util.GetConfigVarFromSections<string>(config, "GatekeeperURI", |
69 | new string[] { "Startup", "Hypergrid", "Messaging" }, String.Empty); | ||
70 | // Legacy. Remove soon! | ||
71 | m_ThisGridURL = config.Configs["Messaging"].GetString("Gatekeeper", m_ThisGridURL); | ||
69 | m_log.DebugFormat("[LURE MODULE]: {0} enabled", Name); | 72 | m_log.DebugFormat("[LURE MODULE]: {0} enabled", Name); |
70 | } | 73 | } |
71 | } | 74 | } |
@@ -151,7 +154,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Lure | |||
151 | 154 | ||
152 | void OnIncomingInstantMessage(GridInstantMessage im) | 155 | void OnIncomingInstantMessage(GridInstantMessage im) |
153 | { | 156 | { |
154 | if (im.dialog == (byte)InstantMessageDialog.RequestTeleport) | 157 | if (im.dialog == (byte)InstantMessageDialog.RequestTeleport |
158 | || im.dialog == (byte)InstantMessageDialog.GodLikeRequestTeleport) | ||
155 | { | 159 | { |
156 | UUID sessionID = new UUID(im.imSessionID); | 160 | UUID sessionID = new UUID(im.imSessionID); |
157 | 161 | ||
@@ -235,16 +239,29 @@ namespace OpenSim.Region.CoreModules.Avatar.Lure | |||
235 | GatekeeperServiceConnector gConn = new GatekeeperServiceConnector(); | 239 | GatekeeperServiceConnector gConn = new GatekeeperServiceConnector(); |
236 | GridRegion gatekeeper = new GridRegion(); | 240 | GridRegion gatekeeper = new GridRegion(); |
237 | gatekeeper.ServerURI = url; | 241 | gatekeeper.ServerURI = url; |
238 | GridRegion finalDestination = gConn.GetHyperlinkRegion(gatekeeper, new UUID(im.RegionID)); | 242 | string homeURI = scene.GetAgentHomeURI(client.AgentId); |
243 | |||
244 | string message; | ||
245 | GridRegion finalDestination = gConn.GetHyperlinkRegion(gatekeeper, new UUID(im.RegionID), client.AgentId, homeURI, out message); | ||
239 | if (finalDestination != null) | 246 | if (finalDestination != null) |
240 | { | 247 | { |
241 | ScenePresence sp = scene.GetScenePresence(client.AgentId); | 248 | ScenePresence sp = scene.GetScenePresence(client.AgentId); |
242 | IEntityTransferModule transferMod = scene.RequestModuleInterface<IEntityTransferModule>(); | 249 | IEntityTransferModule transferMod = scene.RequestModuleInterface<IEntityTransferModule>(); |
243 | 250 | ||
244 | if (transferMod != null && sp != null) | 251 | if (transferMod != null && sp != null) |
252 | { | ||
253 | if (message != null) | ||
254 | sp.ControllingClient.SendAgentAlertMessage(message, true); | ||
255 | |||
245 | transferMod.DoTeleport( | 256 | transferMod.DoTeleport( |
246 | sp, gatekeeper, finalDestination, im.Position + new Vector3(0.5f, 0.5f, 0f), | 257 | sp, gatekeeper, finalDestination, im.Position + new Vector3(0.5f, 0.5f, 0f), |
247 | Vector3.UnitX, teleportflags); | 258 | Vector3.UnitX, teleportflags); |
259 | } | ||
260 | } | ||
261 | else | ||
262 | { | ||
263 | m_log.InfoFormat("[HG LURE MODULE]: Lure failed: {0}", message); | ||
264 | client.SendAgentAlertMessage(message, true); | ||
248 | } | 265 | } |
249 | } | 266 | } |
250 | } | 267 | } |
diff --git a/OpenSim/Region/CoreModules/Avatar/Lure/LureModule.cs b/OpenSim/Region/CoreModules/Avatar/Lure/LureModule.cs index e4b0cfa..465ffbc 100644 --- a/OpenSim/Region/CoreModules/Avatar/Lure/LureModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Lure/LureModule.cs | |||
@@ -165,7 +165,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Lure | |||
165 | (uint)presence.AbsolutePosition.Y, | 165 | (uint)presence.AbsolutePosition.Y, |
166 | (uint)Math.Ceiling(presence.AbsolutePosition.Z)); | 166 | (uint)Math.Ceiling(presence.AbsolutePosition.Z)); |
167 | 167 | ||
168 | m_log.DebugFormat("TP invite with message {0}", message); | 168 | m_log.DebugFormat("[LURE MODULE]: TP invite with message {0}, type {1}", message, lureType); |
169 | 169 | ||
170 | GridInstantMessage m = new GridInstantMessage(scene, client.AgentId, | 170 | GridInstantMessage m = new GridInstantMessage(scene, client.AgentId, |
171 | client.FirstName+" "+client.LastName, targetid, | 171 | client.FirstName+" "+client.LastName, targetid, |