From: Holger Schemel Date: Mon, 20 Aug 2018 09:13:46 +0000 (+0200) Subject: added support for protocol version check as first protocol command X-Git-Tag: 4.1.1.0~69 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=d2bb945e958e551ee43005160e671db37899e8cb;p=rocksndiamonds.git added support for protocol version check as first protocol command --- diff --git a/src/netserv.c b/src/netserv.c index 963a862b..4b846f9d 100644 --- a/src/netserv.c +++ b/src/netserv.c @@ -589,10 +589,12 @@ void NetworkServer(int port, int serveronly) memmove(player->readbuffer, player->readbuffer + 4 + len, player->nread); buffer[0] = player->number; - if (!player->introduced && buffer[1] != OP_PLAYER_NAME) + if (!player->introduced && + buffer[1] != OP_PLAYER_NAME && + buffer[1] != OP_PROTOCOL_VERSION) { if (options.verbose) - Error(ERR_NETWORK_SERVER, "!(client %d)->introduced && buffer[1]==%d (expected OP_PLAYER_NAME)", buffer[0], buffer[1]); + Error(ERR_NETWORK_SERVER, "!(client %d)->introduced && buffer[1]==%d (expected OP_PLAYER_NAME or OP_PROTOCOL_VERSION)", buffer[0], buffer[1]); RemovePlayer(player); interrupt = 1;