Send protocol version to client.

Knightmare of KMQ2 requested this as an easy way to support client site
prtocol auto detection.

While here fix the protocol version number in the error string.
This commit is contained in:
Yamagi 2021-03-28 18:43:36 +02:00
parent 1c8077cf61
commit baae6bed89
1 changed files with 2 additions and 3 deletions

View File

@ -139,7 +139,7 @@ SVC_GetChallenge(void)
}
/* send it back */
Netchan_OutOfBandPrint(NS_SERVER, net_from, "challenge %i",
Netchan_OutOfBandPrint(NS_SERVER, net_from, "challenge %i p=34",
svs.challenges[i].challenge);
}
@ -168,8 +168,7 @@ SVC_DirectConnect(void)
if (version != PROTOCOL_VERSION)
{
Netchan_OutOfBandPrint(NS_SERVER, adr,
"print\nServer is version %s.\n", YQ2VERSION);
Netchan_OutOfBandPrint(NS_SERVER, adr, "print\nServer is protocol version 34.\n");
Com_DPrintf(" rejected connect from version %i\n", version);
return;
}