diff options
author | UbitUmarov | 2019-02-20 03:05:23 +0000 |
---|---|---|
committer | UbitUmarov | 2019-02-20 03:05:23 +0000 |
commit | b56eb2fe63a3bc1aaa954a24c46a1725d5bb704d (patch) | |
tree | f6126f93f6ec6c504e72173d2dcf9b8461bb89e0 /OpenSim/Region/CoreModules/World/Estate | |
parent | add osKickAvatar(LSL_Key agentKey, string alert) (diff) | |
download | opensim-SC-b56eb2fe63a3bc1aaa954a24c46a1725d5bb704d.zip opensim-SC-b56eb2fe63a3bc1aaa954a24c46a1725d5bb704d.tar.gz opensim-SC-b56eb2fe63a3bc1aaa954a24c46a1725d5bb704d.tar.bz2 opensim-SC-b56eb2fe63a3bc1aaa954a24c46a1725d5bb704d.tar.xz |
estate kick now just kill user connection if on same region. The teleport home we did, does not make much sense, and would need more work anyways
Diffstat (limited to 'OpenSim/Region/CoreModules/World/Estate')
-rw-r--r-- | OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs | 25 | ||||
-rw-r--r-- | OpenSim/Region/CoreModules/World/Estate/EstateModule.cs | 23 |
2 files changed, 35 insertions, 13 deletions
diff --git a/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs b/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs index 2e801e3..ac28cee 100644 --- a/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs +++ b/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs | |||
@@ -1204,28 +1204,33 @@ namespace OpenSim.Region.CoreModules.World.Estate | |||
1204 | } | 1204 | } |
1205 | } | 1205 | } |
1206 | 1206 | ||
1207 | private void handleEstateTeleportOneUserHomeRequest(IClientAPI remover_client, UUID invoice, UUID senderID, UUID prey) | 1207 | private void handleEstateTeleportOneUserHomeRequest(IClientAPI remover_client, UUID invoice, UUID senderID, UUID prey, bool kick) |
1208 | { | 1208 | { |
1209 | if (prey == UUID.Zero) | ||
1210 | return; | ||
1211 | |||
1209 | EstateTeleportOneUserHomeRequest evOverride = OnEstateTeleportOneUserHomeRequest; | 1212 | EstateTeleportOneUserHomeRequest evOverride = OnEstateTeleportOneUserHomeRequest; |
1210 | if(evOverride != null) | 1213 | if(evOverride != null) |
1211 | { | 1214 | { |
1212 | evOverride(remover_client, invoice, senderID, prey); | 1215 | evOverride(remover_client, invoice, senderID, prey, kick); |
1213 | return; | 1216 | return; |
1214 | } | 1217 | } |
1215 | 1218 | ||
1216 | if (!Scene.Permissions.CanIssueEstateCommand(remover_client.AgentId, false)) | 1219 | if (!Scene.Permissions.CanIssueEstateCommand(remover_client.AgentId, false)) |
1217 | return; | 1220 | return; |
1218 | 1221 | ||
1219 | if (prey != UUID.Zero) | 1222 | ScenePresence s = Scene.GetScenePresence(prey); |
1223 | if (s != null && !s.IsDeleted && !s.IsInTransit) | ||
1220 | { | 1224 | { |
1221 | ScenePresence s = Scene.GetScenePresence(prey); | 1225 | if (kick) |
1222 | if (s != null && !s.IsDeleted && !s.IsInTransit) | ||
1223 | { | 1226 | { |
1224 | if (!Scene.TeleportClientHome(prey, s.ControllingClient)) | 1227 | s.ControllingClient.Kick("You have been kicked"); |
1225 | { | 1228 | Scene.CloseAgent(s.UUID, false); |
1226 | s.ControllingClient.Kick("You were teleported home by the region owner, but the TP failed - you have been logged out."); | 1229 | } |
1227 | Scene.CloseAgent(s.UUID, false); | 1230 | else if (!Scene.TeleportClientHome(prey, s.ControllingClient)) |
1228 | } | 1231 | { |
1232 | s.ControllingClient.Kick("You were teleported home by the region owner, but the TP failed "); | ||
1233 | Scene.CloseAgent(s.UUID, false); | ||
1229 | } | 1234 | } |
1230 | } | 1235 | } |
1231 | } | 1236 | } |
diff --git a/OpenSim/Region/CoreModules/World/Estate/EstateModule.cs b/OpenSim/Region/CoreModules/World/Estate/EstateModule.cs index f4a174a..c8b9032 100644 --- a/OpenSim/Region/CoreModules/World/Estate/EstateModule.cs +++ b/OpenSim/Region/CoreModules/World/Estate/EstateModule.cs | |||
@@ -204,7 +204,7 @@ namespace OpenSim.Region.CoreModules.World.Estate | |||
204 | m_EstateConnector.SendEstateMessage(estateID, FromID, FromName, Message); | 204 | m_EstateConnector.SendEstateMessage(estateID, FromID, FromName, Message); |
205 | } | 205 | } |
206 | 206 | ||
207 | private void OnEstateTeleportOneUserHomeRequest(IClientAPI client, UUID invoice, UUID senderID, UUID prey) | 207 | private void OnEstateTeleportOneUserHomeRequest(IClientAPI client, UUID invoice, UUID senderID, UUID prey, bool kick) |
208 | { | 208 | { |
209 | if (prey == UUID.Zero) | 209 | if (prey == UUID.Zero) |
210 | return; | 210 | return; |
@@ -227,8 +227,20 @@ namespace OpenSim.Region.CoreModules.World.Estate | |||
227 | ScenePresence p = scene.GetScenePresence(prey); | 227 | ScenePresence p = scene.GetScenePresence(prey); |
228 | if (p != null && !p.IsChildAgent && !p.IsDeleted && !p.IsInTransit) | 228 | if (p != null && !p.IsChildAgent && !p.IsDeleted && !p.IsInTransit) |
229 | { | 229 | { |
230 | p.ControllingClient.SendTeleportStart(16); | 230 | if (kick) |
231 | scene.TeleportClientHome(prey, client); | 231 | { |
232 | p.ControllingClient.Kick("You have been kicked out"); | ||
233 | s.CloseAgent(p.UUID, false); | ||
234 | } | ||
235 | else | ||
236 | { | ||
237 | p.ControllingClient.SendTeleportStart(16); | ||
238 | if (!s.TeleportClientHome(prey, client)) | ||
239 | { | ||
240 | p.ControllingClient.Kick("You were teleported home by the region owner, but the TP failed"); | ||
241 | s.CloseAgent(p.UUID, false); | ||
242 | } | ||
243 | } | ||
232 | return; | 244 | return; |
233 | } | 245 | } |
234 | } | 246 | } |
@@ -259,6 +271,11 @@ namespace OpenSim.Region.CoreModules.World.Estate | |||
259 | { | 271 | { |
260 | p.ControllingClient.SendTeleportStart(16); | 272 | p.ControllingClient.SendTeleportStart(16); |
261 | scene.TeleportClientHome(p.ControllingClient.AgentId, client); | 273 | scene.TeleportClientHome(p.ControllingClient.AgentId, client); |
274 | if (!s.TeleportClientHome(p.ControllingClient.AgentId, client)) | ||
275 | { | ||
276 | p.ControllingClient.Kick("You were teleported home by the region owner, but the TP failed - you have been logged out."); | ||
277 | s.CloseAgent(p.UUID, false); | ||
278 | } | ||
262 | } | 279 | } |
263 | }); | 280 | }); |
264 | } | 281 | } |