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
parent
fdf5274c25
commit
b56eb2fe63
|
@ -1677,8 +1677,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
|
|
||||||
public void SendKillObject(List<uint> localIDs)
|
public void SendKillObject(List<uint> localIDs)
|
||||||
{
|
{
|
||||||
// foreach (uint id in localIDs)
|
// foreach (uint id in localIDs)
|
||||||
// m_log.DebugFormat("[CLIENT]: Sending KillObjectPacket to {0} for {1} in {2}", Name, id, regionHandle);
|
// m_log.DebugFormat("[CLIENT]: Sending KillObjectPacket to {0} for {1} in {2}", Name, id, regionHandle);
|
||||||
|
|
||||||
// remove pending entities to reduce looping chances.
|
// remove pending entities to reduce looping chances.
|
||||||
lock (m_entityProps.SyncRoot)
|
lock (m_entityProps.SyncRoot)
|
||||||
|
@ -1702,10 +1702,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
|
|
||||||
if(++nsent >= 200)
|
if(++nsent >= 200)
|
||||||
{
|
{
|
||||||
kill.Header.Reliable = true;
|
|
||||||
kill.Header.Zerocoded = true;
|
|
||||||
OutPacket(kill, ThrottleOutPacketType.Task);
|
OutPacket(kill, ThrottleOutPacketType.Task);
|
||||||
|
|
||||||
perpacket = localIDs.Count - i - 1;
|
perpacket = localIDs.Count - i - 1;
|
||||||
if(perpacket == 0)
|
if(perpacket == 0)
|
||||||
break;
|
break;
|
||||||
|
@ -1720,8 +1717,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
|
|
||||||
if(nsent != 0)
|
if(nsent != 0)
|
||||||
{
|
{
|
||||||
kill.Header.Reliable = true;
|
|
||||||
kill.Header.Zerocoded = true;
|
|
||||||
OutPacket(kill, ThrottleOutPacketType.Task);
|
OutPacket(kill, ThrottleOutPacketType.Task);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -10047,7 +10042,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
|
|
||||||
UUID.TryParse(Utils.BytesToString(messagePacket.ParamList[1].Parameter), out Prey);
|
UUID.TryParse(Utils.BytesToString(messagePacket.ParamList[1].Parameter), out Prey);
|
||||||
|
|
||||||
OnEstateTeleportOneUserHomeRequest(this, invoice, SenderID, Prey);
|
OnEstateTeleportOneUserHomeRequest(this, invoice, SenderID, Prey, false);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
case "teleporthomeallusers":
|
case "teleporthomeallusers":
|
||||||
|
@ -10195,7 +10190,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
|
|
||||||
UUID.TryParse(Utils.BytesToString(messagePacket.ParamList[0].Parameter), out Prey);
|
UUID.TryParse(Utils.BytesToString(messagePacket.ParamList[0].Parameter), out Prey);
|
||||||
|
|
||||||
OnEstateTeleportOneUserHomeRequest(this, invoice, SenderID, Prey);
|
OnEstateTeleportOneUserHomeRequest(this, invoice, SenderID, Prey, true);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
|
|
@ -1204,28 +1204,33 @@ namespace OpenSim.Region.CoreModules.World.Estate
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void handleEstateTeleportOneUserHomeRequest(IClientAPI remover_client, UUID invoice, UUID senderID, UUID prey)
|
private void handleEstateTeleportOneUserHomeRequest(IClientAPI remover_client, UUID invoice, UUID senderID, UUID prey, bool kick)
|
||||||
{
|
{
|
||||||
|
if (prey == UUID.Zero)
|
||||||
|
return;
|
||||||
|
|
||||||
EstateTeleportOneUserHomeRequest evOverride = OnEstateTeleportOneUserHomeRequest;
|
EstateTeleportOneUserHomeRequest evOverride = OnEstateTeleportOneUserHomeRequest;
|
||||||
if(evOverride != null)
|
if(evOverride != null)
|
||||||
{
|
{
|
||||||
evOverride(remover_client, invoice, senderID, prey);
|
evOverride(remover_client, invoice, senderID, prey, kick);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!Scene.Permissions.CanIssueEstateCommand(remover_client.AgentId, false))
|
if (!Scene.Permissions.CanIssueEstateCommand(remover_client.AgentId, false))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (prey != UUID.Zero)
|
ScenePresence s = Scene.GetScenePresence(prey);
|
||||||
|
if (s != null && !s.IsDeleted && !s.IsInTransit)
|
||||||
{
|
{
|
||||||
ScenePresence s = Scene.GetScenePresence(prey);
|
if (kick)
|
||||||
if (s != null && !s.IsDeleted && !s.IsInTransit)
|
|
||||||
{
|
{
|
||||||
if (!Scene.TeleportClientHome(prey, s.ControllingClient))
|
s.ControllingClient.Kick("You have been kicked");
|
||||||
{
|
Scene.CloseAgent(s.UUID, false);
|
||||||
s.ControllingClient.Kick("You were teleported home by the region owner, but the TP failed - you have been logged out.");
|
}
|
||||||
Scene.CloseAgent(s.UUID, false);
|
else if (!Scene.TeleportClientHome(prey, s.ControllingClient))
|
||||||
}
|
{
|
||||||
|
s.ControllingClient.Kick("You were teleported home by the region owner, but the TP failed ");
|
||||||
|
Scene.CloseAgent(s.UUID, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -204,7 +204,7 @@ namespace OpenSim.Region.CoreModules.World.Estate
|
||||||
m_EstateConnector.SendEstateMessage(estateID, FromID, FromName, Message);
|
m_EstateConnector.SendEstateMessage(estateID, FromID, FromName, Message);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnEstateTeleportOneUserHomeRequest(IClientAPI client, UUID invoice, UUID senderID, UUID prey)
|
private void OnEstateTeleportOneUserHomeRequest(IClientAPI client, UUID invoice, UUID senderID, UUID prey, bool kick)
|
||||||
{
|
{
|
||||||
if (prey == UUID.Zero)
|
if (prey == UUID.Zero)
|
||||||
return;
|
return;
|
||||||
|
@ -227,8 +227,20 @@ namespace OpenSim.Region.CoreModules.World.Estate
|
||||||
ScenePresence p = scene.GetScenePresence(prey);
|
ScenePresence p = scene.GetScenePresence(prey);
|
||||||
if (p != null && !p.IsChildAgent && !p.IsDeleted && !p.IsInTransit)
|
if (p != null && !p.IsChildAgent && !p.IsDeleted && !p.IsInTransit)
|
||||||
{
|
{
|
||||||
p.ControllingClient.SendTeleportStart(16);
|
if (kick)
|
||||||
scene.TeleportClientHome(prey, client);
|
{
|
||||||
|
p.ControllingClient.Kick("You have been kicked out");
|
||||||
|
s.CloseAgent(p.UUID, false);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
p.ControllingClient.SendTeleportStart(16);
|
||||||
|
if (!s.TeleportClientHome(prey, client))
|
||||||
|
{
|
||||||
|
p.ControllingClient.Kick("You were teleported home by the region owner, but the TP failed");
|
||||||
|
s.CloseAgent(p.UUID, false);
|
||||||
|
}
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -259,6 +271,11 @@ namespace OpenSim.Region.CoreModules.World.Estate
|
||||||
{
|
{
|
||||||
p.ControllingClient.SendTeleportStart(16);
|
p.ControllingClient.SendTeleportStart(16);
|
||||||
scene.TeleportClientHome(p.ControllingClient.AgentId, client);
|
scene.TeleportClientHome(p.ControllingClient.AgentId, client);
|
||||||
|
if (!s.TeleportClientHome(p.ControllingClient.AgentId, client))
|
||||||
|
{
|
||||||
|
p.ControllingClient.Kick("You were teleported home by the region owner, but the TP failed - you have been logged out.");
|
||||||
|
s.CloseAgent(p.UUID, false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue