diff options
Diffstat (limited to 'src/server/sv_client.c')
-rw-r--r-- | src/server/sv_client.c | 38 |
1 files changed, 9 insertions, 29 deletions
diff --git a/src/server/sv_client.c b/src/server/sv_client.c index fe7cc905..3ee193dd 100644 --- a/src/server/sv_client.c +++ b/src/server/sv_client.c @@ -233,22 +233,8 @@ void SV_DirectConnect( netadr_t from ) { if ( !newcl ) { if ( NET_IsLocalAddress( from ) ) { - count = 0; - for ( i = startIndex; i < sv_maxclients->integer ; i++ ) { - cl = &svs.clients[i]; - if (cl->netchan.remoteAddress.type == NA_BOT) { - count++; - } - } - // if they're all bots - if (count >= sv_maxclients->integer - startIndex) { - SV_DropClient(&svs.clients[sv_maxclients->integer - 1], "only bots on server"); - newcl = &svs.clients[sv_maxclients->integer - 1]; - } - else { - Com_Error( ERR_FATAL, "server is full on local connect\n" ); - return; - } + Com_Error( ERR_FATAL, "server is full on local connect\n" ); + return; } else { NET_OutOfBandPrint( NS_SERVER, from, "print\nServer is full" ); @@ -282,7 +268,7 @@ gotnewcl: Q_strncpyz( newcl->userinfo, userinfo, sizeof(newcl->userinfo) ); // get the game a chance to reject this connection or modify the userinfo - denied = VM_Call( gvm, GAME_CLIENT_CONNECT, clientNum, qtrue, qfalse ); // firstTime = qtrue + denied = VM_Call( gvm, GAME_CLIENT_CONNECT, clientNum, qtrue ); // firstTime = qtrue if ( denied ) { // we can't just use VM_ArgPtr, because that is only valid inside a VM_Call char *str = VM_ExplicitArgPtr( gvm, denied ); @@ -340,15 +326,13 @@ void SV_DropClient( client_t *drop, const char *reason ) { return; // already dropped } - if (drop->netchan.remoteAddress.type != NA_BOT) { - // see if we already have a challenge for this ip - challenge = &svs.challenges[0]; + // see if we already have a challenge for this ip + challenge = &svs.challenges[0]; - for (i = 0 ; i < MAX_CHALLENGES ; i++, challenge++) { - if ( NET_CompareAdr( drop->netchan.remoteAddress, challenge->adr ) ) { - challenge->connected = qfalse; - break; - } + for (i = 0 ; i < MAX_CHALLENGES ; i++, challenge++) { + if ( NET_CompareAdr( drop->netchan.remoteAddress, challenge->adr ) ) { + challenge->connected = qfalse; + break; } } @@ -373,10 +357,6 @@ void SV_DropClient( client_t *drop, const char *reason ) { // add the disconnect command SV_SendServerCommand( drop, "disconnect \"%s\"", reason); - if ( drop->netchan.remoteAddress.type == NA_BOT ) { - SV_BotFreeClient( drop - svs.clients ); - } - // nuke user info SV_SetUserinfo( drop - svs.clients, "" ); |