X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fngircd%2Fclient.c;h=c38c386b936fc46fe1227e59dfbb4b2f4f71447f;hb=7d30c8cebccf1b0e391333858a9d011d1f0d864e;hp=3c6d3aebfbc596cd7a38cfe202a15c354e9bec6f;hpb=c2f60abe55b5a8d320a27df0ce41790fa1141081;p=ngircd-alex.git diff --git a/src/ngircd/client.c b/src/ngircd/client.c index 3c6d3aeb..c38c386b 100644 --- a/src/ngircd/client.c +++ b/src/ngircd/client.c @@ -9,7 +9,7 @@ * Naehere Informationen entnehmen Sie bitter der Datei COPYING. Eine Liste * der an ngIRCd beteiligten Autoren finden Sie in der Datei AUTHORS. * - * $Id: client.c,v 1.55 2002/05/27 13:09:26 alex Exp $ + * $Id: client.c,v 1.59 2002/06/10 21:09:39 alex Exp $ * * client.c: Management aller Clients * @@ -73,7 +73,7 @@ Client_Init( VOID ) if( ! This_Server ) { Log( LOG_EMERG, "Can't allocate client structure for server! Going down." ); - Log( LOG_ALERT, PACKAGE" exiting due to fatal errors!" ); + Log( LOG_ALERT, "%s exiting due to fatal errors!", PACKAGE ); exit( 1 ); } @@ -102,7 +102,8 @@ Client_Exit( VOID ) CLIENT *c, *next; INT cnt; - Client_Destroy( This_Server, "Server going down.", NULL, FALSE ); + if( NGIRCd_Restart ) Client_Destroy( This_Server, "Server going down (restarting).", NULL, FALSE ); + else Client_Destroy( This_Server, "Server going down.", NULL, FALSE ); cnt = 0; c = My_Clients; @@ -249,7 +250,7 @@ Client_Destroy( CLIENT *Client, CHAR *LogMsg, CHAR *FwdMsg, BOOLEAN SendQuit ) else IRC_WriteStrServersPrefix( Client_NextHop( c ), c, "QUIT :" ); } } - Channel_RemoveClient( c, FwdMsg ? FwdMsg : c->id ); + Channel_Quit( c, FwdMsg ? FwdMsg : c->id ); } else if( c->type == CLIENT_SERVER ) { @@ -906,10 +907,12 @@ Client_IsValidNick( CHAR *Nick ) { /* Ist der Nick gueltig? */ - CHAR *ptr, goodchars[] = ";0123456789-"; + CHAR *ptr, goodchars[20]; assert( Nick != NULL ); + strcpy( goodchars, ";0123456789-" ); + if( Nick[0] == '#' ) return FALSE; if( strchr( goodchars, Nick[0] )) return FALSE; if( strlen( Nick ) >= CLIENT_NICK_LEN ) return FALSE; @@ -970,7 +973,7 @@ New_Client_Struct( VOID ) c = malloc( sizeof( CLIENT )); if( ! c ) { - Log( LOG_EMERG, "Can't allocate memory!" ); + Log( LOG_EMERG, "Can't allocate memory! [New_Client_Struct]" ); return NULL; }