]> arthur.barton.de Git - ngircd-alex.git/blobdiff - src/ngircd/client.c
IPv6: Add config options to disabe ipv4/ipv6 support.
[ngircd-alex.git] / src / ngircd / client.c
index 474ae4b6460c4be738b90e723065885ffa0a51ad..24b24c78a9cbf789ba1fc2e5e071cd74b5dcf8b9 100644 (file)
@@ -17,7 +17,7 @@
 
 #include "portab.h"
 
-static char UNUSED id[] = "$Id: client.c,v 1.96 2007/10/25 11:01:19 fw 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>
@@ -55,6 +55,7 @@ static char GetID_Buffer[GETID_LEN];
 
 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 ));
@@ -69,9 +70,6 @@ static CLIENT *Init_New_Client PARAMS((CONN_ID Idx, CLIENT *Introducer,
  char *Info, int Hops, int Token, char *Modes, bool Idented));
 
 
-long Max_Users = 0, My_Max_Users = 0;
-
-
 GLOBAL void
 Client_Init( void )
 {
@@ -609,7 +607,8 @@ Client_ID( CLIENT *Client )
        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;
@@ -952,7 +951,7 @@ Client_IsValidNick( const char *Nick )
 
        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 )