* Acks the first UseCircuitCode packet
* Implements Teleport One Agent Home0.6.0-stable
parent
15b36498be
commit
4ee368785d
|
@ -324,7 +324,7 @@ namespace OpenSim.Region.ClientStack
|
||||||
|
|
||||||
m_userEndPoint = remoteEP;
|
m_userEndPoint = remoteEP;
|
||||||
m_proxyEndPoint = proxyEP;
|
m_proxyEndPoint = proxyEP;
|
||||||
|
|
||||||
m_startpos = m_authenticateSessionsHandler.GetPosition(circuitCode);
|
m_startpos = m_authenticateSessionsHandler.GetPosition(circuitCode);
|
||||||
|
|
||||||
// While working on this, the BlockingQueue had me fooled for a bit.
|
// While working on this, the BlockingQueue had me fooled for a bit.
|
||||||
|
|
|
@ -295,6 +295,17 @@ namespace OpenSim.Region.ClientStack
|
||||||
// new client
|
// new client
|
||||||
m_log.Debug("[UDPSERVER]: Adding New Client");
|
m_log.Debug("[UDPSERVER]: Adding New Client");
|
||||||
AddNewClient(packet);
|
AddNewClient(packet);
|
||||||
|
|
||||||
|
UseCircuitCodePacket p = (UseCircuitCodePacket)packet;
|
||||||
|
|
||||||
|
// Ack the first UseCircuitCode packet
|
||||||
|
PacketAckPacket ack_it = (PacketAckPacket)PacketPool.Instance.GetPacket(PacketType.PacketAck);
|
||||||
|
// TODO: don't create new blocks if recycling an old packet
|
||||||
|
ack_it.Packets = new PacketAckPacket.PacketsBlock[1];
|
||||||
|
ack_it.Packets[0] = new PacketAckPacket.PacketsBlock();
|
||||||
|
ack_it.Packets[0].ID = packet.Header.Sequence;
|
||||||
|
ack_it.Header.Reliable = false;
|
||||||
|
SendPacketTo(ack_it.ToBytes(),ack_it.ToBytes().Length,SocketFlags.None,p.CircuitCode.Code);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -221,10 +221,35 @@ namespace OpenSim.Region.Environment
|
||||||
SetRegionDebug(remote_client, packet);
|
SetRegionDebug(remote_client, packet);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case "teleporthomeuser":
|
||||||
|
if (m_scene.PermissionsMngr.GenericEstatePermission(remote_client.AgentId))
|
||||||
|
{
|
||||||
|
TeleportOneUserHome(remote_client,packet);
|
||||||
|
}
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
m_log.Error("EstateOwnerMessage: Unknown method requested\n" + packet.ToString());
|
m_log.Error("EstateOwnerMessage: Unknown method requested\n" + packet.ToString());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private void TeleportOneUserHome(object remove_client,EstateOwnerMessagePacket packet)
|
||||||
|
{
|
||||||
|
LLUUID invoice = packet.MethodData.Invoice;
|
||||||
|
LLUUID SenderID = packet.AgentData.AgentID;
|
||||||
|
LLUUID Prey = LLUUID.Zero;
|
||||||
|
|
||||||
|
Helpers.TryParse(Helpers.FieldToUTF8String(packet.ParamList[1].Parameter),out Prey);
|
||||||
|
if (Prey != LLUUID.Zero)
|
||||||
|
{
|
||||||
|
ScenePresence s = m_scene.GetScenePresence(Prey);
|
||||||
|
if (s != null)
|
||||||
|
{
|
||||||
|
m_scene.TeleportClientHome(Prey, s.ControllingClient);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void SetRegionDebug(IClientAPI remote_client, EstateOwnerMessagePacket packet)
|
private void SetRegionDebug(IClientAPI remote_client, EstateOwnerMessagePacket packet)
|
||||||
|
|
Loading…
Reference in New Issue