#include "portab.h"
-static char UNUSED id[] = "$Id: client.c,v 1.95 2007/01/23 16:07:19 alex Exp $";
+static char UNUSED id[] = "$Id: client.c,v 1.98 2008/04/04 19:30:01 fw Exp $";
#include "imp.h"
#include <assert.h>
static WHOWAS My_Whowas[MAX_WHOWAS];
static int Last_Whowas = -1;
+static long Max_Users, My_Max_Users;
static unsigned long Count PARAMS(( CLIENT_TYPE Type ));
char *Info, int Hops, int Token, char *Modes, bool Idented));
-long Max_Users = 0, My_Max_Users = 0;
-
-
GLOBAL void
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 );
GLOBAL CLIENT *
-Client_Search( char *Nick )
+Client_Search( const char *Nick )
{
/* return Client-Structure that has the corresponding Nick.
* If none is found, return NULL.
assert( Client != NULL );
#ifdef DEBUG
- if( Client->type == CLIENT_USER ) assert( strlen( Client->id ) < CLIENT_NICK_LEN );
+ if(Client->type == CLIENT_USER)
+ assert(strlen(Client->id) < Conf_MaxNickLength);
#endif
if( Client->id[0] ) return Client->id;
if( Nick[0] == '#' ) return false;
if( strchr( goodchars, Nick[0] )) return false;
- if( strlen( Nick ) >= CLIENT_NICK_LEN ) return false;
+ if( strlen( Nick ) >= Conf_MaxNickLength) return false;
ptr = Nick;
while( *ptr )