X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?p=ngircd-alex.git;a=blobdiff_plain;f=src%2Fngircd%2Fclient.c;h=474ae4b6460c4be738b90e723065885ffa0a51ad;hp=ce97c1eeb797cdf7e3f190c8db4059dece02f44c;hb=001c00b27312289e40425db19ce9f7d957ffbbba;hpb=5040d5648952f6e27eb80fd765c1e0850d73774e diff --git a/src/ngircd/client.c b/src/ngircd/client.c index ce97c1ee..474ae4b6 100644 --- a/src/ngircd/client.c +++ b/src/ngircd/client.c @@ -17,7 +17,7 @@ #include "portab.h" -static char UNUSED id[] = "$Id: client.c,v 1.94 2006/12/07 22:24:14 fw Exp $"; +static char UNUSED id[] = "$Id: client.c,v 1.96 2007/10/25 11:01:19 fw Exp $"; #include "imp.h" #include @@ -68,10 +68,6 @@ static CLIENT *Init_New_Client PARAMS((CONN_ID Idx, CLIENT *Introducer, CLIENT *TopServer, int Type, char *ID, char *User, char *Hostname, char *Info, int Hops, int Token, char *Modes, bool Idented)); -#ifndef Client_DestroyNow -GLOBAL void Client_DestroyNow PARAMS((CLIENT *Client )); -#endif - long Max_Users = 0, My_Max_Users = 0; @@ -98,9 +94,10 @@ Client_Init( void ) This_Server->hops = 0; gethostname( This_Server->host, CLIENT_HOST_LEN ); - h = gethostbyname( This_Server->host ); - if( h ) strlcpy( This_Server->host, h->h_name, sizeof( This_Server->host )); - + if (!Conf_NoDNS) { + h = gethostbyname( This_Server->host ); + if (h) strlcpy(This_Server->host, h->h_name, sizeof(This_Server->host)); + } Client_SetID( This_Server, Conf_ServerName ); Client_SetInfo( This_Server, Conf_ServerInfo ); @@ -336,35 +333,6 @@ Client_Destroy( CLIENT *Client, char *LogMsg, char *FwdMsg, bool SendQuit ) } /* Client_Destroy */ -GLOBAL void -Client_DestroyNow( CLIENT *Client ) -{ - /* Destroy client structure immediately. This function is only - * intended for the connection layer to remove client structures - * of connections that can't be established! */ - - CLIENT *last, *c; - - assert( Client != NULL ); - - last = NULL; - c = My_Clients; - while( c ) - { - if( c == Client ) - { - /* Wir haben den Client gefunden: entfernen */ - if( last ) last->next = c->next; - else My_Clients = (CLIENT *)c->next; - free( c ); - break; - } - last = c; - c = (CLIENT *)c->next; - } -} /* Client_DestroyNow */ - - GLOBAL void Client_SetHostname( CLIENT *Client, char *Hostname ) {