]> arthur.barton.de Git - ngircd-alex.git/blobdiff - src/ngircd/client.c
Fixed a typo in variable name ...
[ngircd-alex.git] / src / ngircd / client.c
index bfc3a4f8af43aec4fe0390a9503ba34aecc0846e..f7664df69545cf723e73002248dc7710d9022ab6 100644 (file)
@@ -17,7 +17,7 @@
 
 #include "portab.h"
 
-static char UNUSED id[] = "$Id: client.c,v 1.73 2003/01/15 14:28:25 alex Exp $";
+static char UNUSED id[] = "$Id: client.c,v 1.77 2005/01/20 00:11:49 alex Exp $";
 
 #include "imp.h"
 #include <assert.h>
@@ -25,6 +25,7 @@ static char UNUSED id[] = "$Id: client.c,v 1.73 2003/01/15 14:28:25 alex Exp $";
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+#include <strings.h>
 #include <netdb.h>
 
 #include "conn.h"
@@ -76,7 +77,7 @@ Client_Init( VOID )
        if( ! This_Server )
        {
                Log( LOG_EMERG, "Can't allocate client structure for server! Going down." );
-               Log( LOG_ALERT, "%s exiting due to fatal errors!", PACKAGE );
+               Log( LOG_ALERT, "%s exiting due to fatal errors!", PACKAGE_NAME );
                exit( 1 );
        }
 
@@ -1023,31 +1024,21 @@ New_Client_Struct( VOID )
        
        CLIENT *c;
        
-       c = malloc( sizeof( CLIENT ));
+       c = (CLIENT *)malloc( sizeof( CLIENT ));
        if( ! c )
        {
                Log( LOG_EMERG, "Can't allocate memory! [New_Client_Struct]" );
                return NULL;
        }
 
-       c->next = NULL;
-       c->hash = 0;
+       memset( c, 0, sizeof ( CLIENT ));
+
        c->type = CLIENT_UNKNOWN;
        c->conn_id = NONE;
-       c->introducer = NULL;
-       c->topserver = NULL;
-       strcpy( c->id, "" );
-       strcpy( c->pwd, "" );
-       strcpy( c->host, "" );
-       strcpy( c->user, "" );
-       strcpy( c->info, "" );
-       strcpy( c->modes, "" );
        c->oper_by_me = FALSE;
        c->hops = -1;
        c->token = -1;
        c->mytoken = -1;
-       strcpy( c->away, "" );
-       strcpy( c->flags, "" );
 
        return c;
 } /* New_Client */