diff options
author | David Walter Seikel | 2016-11-03 21:44:39 +1000 |
---|---|---|
committer | David Walter Seikel | 2016-11-03 21:44:39 +1000 |
commit | 134f86e8d5c414409631b25b8c6f0ee45fbd8631 (patch) | |
tree | 216b89d3fb89acfb81be1e440c25c41ab09fa96d /OpenSim/Region/CoreModules/Avatar/Lure/HGLureModule.cs | |
parent | More changing to production grid. Double oops. (diff) | |
download | opensim-SC_OLD-134f86e8d5c414409631b25b8c6f0ee45fbd8631.zip opensim-SC_OLD-134f86e8d5c414409631b25b8c6f0ee45fbd8631.tar.gz opensim-SC_OLD-134f86e8d5c414409631b25b8c6f0ee45fbd8631.tar.bz2 opensim-SC_OLD-134f86e8d5c414409631b25b8c6f0ee45fbd8631.tar.xz |
Initial update to OpenSim 0.8.2.1 source code.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/CoreModules/Avatar/Lure/HGLureModule.cs | 23 |
1 files changed, 20 insertions, 3 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 | } |