mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Merge pull request #501 from heinrich5991/pr_ddnet_no_tokens_for_vanilla2
Also don't send the token magic to unsupported clients
This commit is contained in:
commit
d34dcd42ac
|
@ -339,8 +339,7 @@ void CNetServer::OnPreConnMsg(NETADDR &Addr, CNetPacketConstruct &Packet)
|
|||
}
|
||||
|
||||
// simulate accept
|
||||
SendControl(Addr, NET_CTRLMSG_CONNECTACCEPT, SECURITY_TOKEN_MAGIC,
|
||||
sizeof(SECURITY_TOKEN_MAGIC), NET_SECURITY_TOKEN_UNSUPPORTED);
|
||||
SendControl(Addr, NET_CTRLMSG_CONNECTACCEPT, NULL, 0, NET_SECURITY_TOKEN_UNSUPPORTED);
|
||||
|
||||
// Begin vanilla compatible token handshake
|
||||
// The idea is to pack a security token in the gametick
|
||||
|
@ -410,8 +409,7 @@ void CNetServer::OnPreConnMsg(NETADDR &Addr, CNetPacketConstruct &Packet)
|
|||
else
|
||||
{
|
||||
// accept client directy
|
||||
SendControl(Addr, NET_CTRLMSG_CONNECTACCEPT, SECURITY_TOKEN_MAGIC,
|
||||
sizeof(SECURITY_TOKEN_MAGIC), NET_SECURITY_TOKEN_UNSUPPORTED);
|
||||
SendControl(Addr, NET_CTRLMSG_CONNECTACCEPT, NULL, 0, NET_SECURITY_TOKEN_UNSUPPORTED);
|
||||
|
||||
TryAcceptClient(Addr, NET_SECURITY_TOKEN_UNSUPPORTED);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue