summaryrefslogtreecommitdiff
path: root/src/server/sv_client.c
diff options
context:
space:
mode:
authorTim Angus <tim@ngus.net>2006-05-16 20:41:57 +0000
committerTim Angus <tim@ngus.net>2006-05-16 20:41:57 +0000
commit5c0efda0ef811b2bafedb2b4f53b083a9b90e1b4 (patch)
tree972db3bf7fabe5293b383bb51fcb1aa74cc0e309 /src/server/sv_client.c
parentf68a49a146f20c7b6fc8e19dd1c4e6d58cf473e9 (diff)
* Removal of bot code
* Refactored botlib parsing code into qcommon
Diffstat (limited to 'src/server/sv_client.c')
-rw-r--r--src/server/sv_client.c38
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, "" );