diff options
author | onefang | 2019-05-19 21:24:15 +1000 |
---|---|---|
committer | onefang | 2019-05-19 21:24:15 +1000 |
commit | 5e4d6cab00cb29cd088ab7b62ab13aff103b64cb (patch) | |
tree | a9fbc62df9eb2d1d9ba2698d8552eae71eca20d8 /OpenSim/Region/CoreModules/Avatar/Lure | |
parent | Add a build script. (diff) | |
download | opensim-SC_OLD-5e4d6cab00cb29cd088ab7b62ab13aff103b64cb.zip opensim-SC_OLD-5e4d6cab00cb29cd088ab7b62ab13aff103b64cb.tar.gz opensim-SC_OLD-5e4d6cab00cb29cd088ab7b62ab13aff103b64cb.tar.bz2 opensim-SC_OLD-5e4d6cab00cb29cd088ab7b62ab13aff103b64cb.tar.xz |
Dump OpenSim 0.9.0.1 into it's own branch.
Diffstat (limited to 'OpenSim/Region/CoreModules/Avatar/Lure')
-rw-r--r-- | OpenSim/Region/CoreModules/Avatar/Lure/HGLureModule.cs | 6 | ||||
-rw-r--r-- | OpenSim/Region/CoreModules/Avatar/Lure/LureModule.cs | 30 |
2 files changed, 25 insertions, 11 deletions
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 | |||
65 | { | 65 | { |
66 | m_Enabled = true; | 66 | m_Enabled = true; |
67 | 67 | ||
68 | m_ThisGridURL = Util.GetConfigVarFromSections<string>(config, "GatekeeperURI", | 68 | m_ThisGridURL = Util.GetConfigVarFromSections<string>(config, "GatekeeperURI", |
69 | new string[] { "Startup", "Hypergrid", "Messaging" }, String.Empty); | 69 | new string[] { "Startup", "Hypergrid", "Messaging" }, String.Empty); |
70 | // Legacy. Remove soon! | 70 | // Legacy. Remove soon! |
71 | m_ThisGridURL = config.Configs["Messaging"].GetString("Gatekeeper", m_ThisGridURL); | 71 | m_ThisGridURL = config.Configs["Messaging"].GetString("Gatekeeper", m_ThisGridURL); |
@@ -154,7 +154,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Lure | |||
154 | 154 | ||
155 | void OnIncomingInstantMessage(GridInstantMessage im) | 155 | void OnIncomingInstantMessage(GridInstantMessage im) |
156 | { | 156 | { |
157 | if (im.dialog == (byte)InstantMessageDialog.RequestTeleport | 157 | if (im.dialog == (byte)InstantMessageDialog.RequestTeleport |
158 | || im.dialog == (byte)InstantMessageDialog.GodLikeRequestTeleport) | 158 | || im.dialog == (byte)InstantMessageDialog.GodLikeRequestTeleport) |
159 | { | 159 | { |
160 | UUID sessionID = new UUID(im.imSessionID); | 160 | UUID sessionID = new UUID(im.imSessionID); |
@@ -195,7 +195,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Lure | |||
195 | 195 | ||
196 | m_log.DebugFormat("[HG LURE MODULE]: RequestTeleport sessionID={0}, regionID={1}, message={2}", m.imSessionID, m.RegionID, m.message); | 196 | m_log.DebugFormat("[HG LURE MODULE]: RequestTeleport sessionID={0}, regionID={1}, message={2}", m.imSessionID, m.RegionID, m.message); |
197 | m_PendingLures.Add(sessionID, m, 7200); // 2 hours | 197 | m_PendingLures.Add(sessionID, m, 7200); // 2 hours |
198 | 198 | ||
199 | if (m_TransferModule != null) | 199 | if (m_TransferModule != null) |
200 | { | 200 | { |
201 | m_TransferModule.SendInstantMessage(m, | 201 | 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 | |||
163 | scene.RegionInfo.RegionHandle, | 163 | scene.RegionInfo.RegionHandle, |
164 | (uint)presence.AbsolutePosition.X, | 164 | (uint)presence.AbsolutePosition.X, |
165 | (uint)presence.AbsolutePosition.Y, | 165 | (uint)presence.AbsolutePosition.Y, |
166 | (uint)Math.Ceiling(presence.AbsolutePosition.Z)); | 166 | (uint)presence.AbsolutePosition.Z + 2); |
167 | 167 | ||
168 | m_log.DebugFormat("[LURE MODULE]: TP invite with message {0}, type {1}", message, lureType); | 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; |
171 | client.FirstName+" "+client.LastName, targetid, | 171 | |
172 | (byte)InstantMessageDialog.RequestTeleport, false, | 172 | if (scene.Permissions.IsAdministrator(client.AgentId) && presence.IsViewerUIGod && (!scene.Permissions.IsAdministrator(targetid))) |
173 | message, dest, false, presence.AbsolutePosition, | 173 | { |
174 | new Byte[0], true); | 174 | m = new GridInstantMessage(scene, client.AgentId, |
175 | 175 | client.FirstName+" "+client.LastName, targetid, | |
176 | (byte)InstantMessageDialog.GodLikeRequestTeleport, false, | ||
177 | message, dest, false, presence.AbsolutePosition, | ||
178 | new Byte[0], true); | ||
179 | } | ||
180 | else | ||
181 | { | ||
182 | m = new GridInstantMessage(scene, client.AgentId, | ||
183 | client.FirstName+" "+client.LastName, targetid, | ||
184 | (byte)InstantMessageDialog.RequestTeleport, false, | ||
185 | message, dest, false, presence.AbsolutePosition, | ||
186 | new Byte[0], true); | ||
187 | } | ||
188 | |||
176 | if (m_TransferModule != null) | 189 | if (m_TransferModule != null) |
177 | { | 190 | { |
178 | m_TransferModule.SendInstantMessage(m, | 191 | m_TransferModule.SendInstantMessage(m, |
@@ -207,7 +220,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Lure | |||
207 | { | 220 | { |
208 | // Forward remote teleport requests | 221 | // Forward remote teleport requests |
209 | // | 222 | // |
210 | if (msg.dialog != 22) | 223 | if (msg.dialog != (byte)InstantMessageDialog.RequestTeleport && |
224 | msg.dialog != (byte)InstantMessageDialog.GodLikeRequestTeleport) | ||
211 | return; | 225 | return; |
212 | 226 | ||
213 | if (m_TransferModule != null) | 227 | if (m_TransferModule != null) |