diff options
Diffstat (limited to 'OpenSim')
3 files changed, 39 insertions, 22 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index b7d5a80..943be07 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | |||
@@ -1677,8 +1677,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
1677 | 1677 | ||
1678 | public void SendKillObject(List<uint> localIDs) | 1678 | public void SendKillObject(List<uint> localIDs) |
1679 | { | 1679 | { |
1680 | // foreach (uint id in localIDs) | 1680 | // foreach (uint id in localIDs) |
1681 | // m_log.DebugFormat("[CLIENT]: Sending KillObjectPacket to {0} for {1} in {2}", Name, id, regionHandle); | 1681 | // m_log.DebugFormat("[CLIENT]: Sending KillObjectPacket to {0} for {1} in {2}", Name, id, regionHandle); |
1682 | 1682 | ||
1683 | // remove pending entities to reduce looping chances. | 1683 | // remove pending entities to reduce looping chances. |
1684 | lock (m_entityProps.SyncRoot) | 1684 | lock (m_entityProps.SyncRoot) |
@@ -1702,10 +1702,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
1702 | 1702 | ||
1703 | if(++nsent >= 200) | 1703 | if(++nsent >= 200) |
1704 | { | 1704 | { |
1705 | kill.Header.Reliable = true; | ||
1706 | kill.Header.Zerocoded = true; | ||
1707 | OutPacket(kill, ThrottleOutPacketType.Task); | 1705 | OutPacket(kill, ThrottleOutPacketType.Task); |
1708 | |||
1709 | perpacket = localIDs.Count - i - 1; | 1706 | perpacket = localIDs.Count - i - 1; |
1710 | if(perpacket == 0) | 1707 | if(perpacket == 0) |
1711 | break; | 1708 | break; |
@@ -1720,8 +1717,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
1720 | 1717 | ||
1721 | if(nsent != 0) | 1718 | if(nsent != 0) |
1722 | { | 1719 | { |
1723 | kill.Header.Reliable = true; | ||
1724 | kill.Header.Zerocoded = true; | ||
1725 | OutPacket(kill, ThrottleOutPacketType.Task); | 1720 | OutPacket(kill, ThrottleOutPacketType.Task); |
1726 | } | 1721 | } |
1727 | } | 1722 | } |
@@ -10047,7 +10042,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
10047 | 10042 | ||
10048 | UUID.TryParse(Utils.BytesToString(messagePacket.ParamList[1].Parameter), out Prey); | 10043 | UUID.TryParse(Utils.BytesToString(messagePacket.ParamList[1].Parameter), out Prey); |
10049 | 10044 | ||
10050 | OnEstateTeleportOneUserHomeRequest(this, invoice, SenderID, Prey); | 10045 | OnEstateTeleportOneUserHomeRequest(this, invoice, SenderID, Prey, false); |
10051 | } | 10046 | } |
10052 | return true; | 10047 | return true; |
10053 | case "teleporthomeallusers": | 10048 | case "teleporthomeallusers": |
@@ -10195,7 +10190,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
10195 | 10190 | ||
10196 | UUID.TryParse(Utils.BytesToString(messagePacket.ParamList[0].Parameter), out Prey); | 10191 | UUID.TryParse(Utils.BytesToString(messagePacket.ParamList[0].Parameter), out Prey); |
10197 | 10192 | ||
10198 | OnEstateTeleportOneUserHomeRequest(this, invoice, SenderID, Prey); | 10193 | OnEstateTeleportOneUserHomeRequest(this, invoice, SenderID, Prey, true); |
10199 | } | 10194 | } |
10200 | return true; | 10195 | return true; |
10201 | 10196 | ||
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 | } |