diff options
| author | Alexander Barton <alex@barton.de> | 2002-01-21 00:08:50 +0000 |
|---|---|---|
| committer | Alexander Barton <alex@barton.de> | 2002-01-21 00:08:50 +0000 |
| commit | fc3c82f7dfbabb06f78e097f1fabf2eea897a576 (patch) | |
| tree | 193c396f1ac10bd1e3c8c443662d2a9636e7a467 | |
| parent | 5999fcea4e5129688c3de2975228ec9f58836d86 (diff) | |
| download | ngircd-fc3c82f7dfbabb06f78e097f1fabf2eea897a576.tar.gz ngircd-fc3c82f7dfbabb06f78e097f1fabf2eea897a576.zip | |
- wird ein Client entfernt, so wird er auch aus allen Channels geloescht.
| -rw-r--r-- | src/ngircd/client.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/ngircd/client.c b/src/ngircd/client.c index 285b51d7..385ce8e6 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.30 2002/01/18 15:32:01 alex Exp $ + * $Id: client.c,v 1.31 2002/01/21 00:08:50 alex Exp $ * * client.c: Management aller Clients * @@ -21,6 +21,9 @@ * Server gewesen, so existiert eine entsprechende CONNECTION-Struktur. * * $Log: client.c,v $ + * Revision 1.31 2002/01/21 00:08:50 alex + * - wird ein Client entfernt, so wird er auch aus allen Channels geloescht. + * * Revision 1.30 2002/01/18 15:32:01 alex * - bei Client_SetModes() wurde das NULL-Byte falsch gesetzt. Opsa. * @@ -319,6 +322,7 @@ GLOBAL VOID Client_Destroy( CLIENT *Client, CHAR *LogMsg, CHAR *FwdMsg ) if( FwdMsg ) IRC_WriteStrServersPrefix( Client_NextHop( c ), c, "QUIT :%s", FwdMsg ); else IRC_WriteStrServersPrefix( Client_NextHop( c ), c, "QUIT :" ); } + Channel_RemoveClient( c, FwdMsg ? FwdMsg : c->id ); } else if( c->type == CLIENT_SERVER ) { @@ -879,7 +883,6 @@ LOCAL CLIENT *New_Client_Struct( VOID ) /* Neue CLIENT-Struktur pre-initialisieren */ CLIENT *c; - INT i; c = malloc( sizeof( CLIENT )); if( ! c ) @@ -897,7 +900,6 @@ LOCAL CLIENT *New_Client_Struct( VOID ) strcpy( c->host, "" ); strcpy( c->user, "" ); strcpy( c->info, "" ); - for( i = 0; i < MAX_CHANNELS; c->channels[i++] = NULL ); strcpy( c->modes, "" ); c->oper_by_me = FALSE; c->hops = -1; |