]> arthur.barton.de Git - ngircd-alex.git/blobdiff - src/ngircd/client.c
- diverse Aenderungen fuer Channels ueber mehrere Server.
[ngircd-alex.git] / src / ngircd / client.c
index 768445dc8f738c2de08ae03c6a067ef09913e453..385ce8e680c4bbca9f80dea191a5aba5be55d292 100644 (file)
@@ -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.29 2002/01/16 22:10:35 alex Exp $
+ * $Id: client.c,v 1.31 2002/01/21 00:08:50 alex Exp $
  *
  * client.c: Management aller Clients
  *
  * 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.
+ *
  * Revision 1.29  2002/01/16 22:10:35  alex
  * - neue Funktionen Client_xxxCount().
  *
@@ -316,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 )
                        {
@@ -390,7 +397,7 @@ GLOBAL VOID Client_SetModes( CLIENT *Client, CHAR *Modes )
 
        assert( Client != NULL );
        strncpy( Client->modes, Modes, CLIENT_MODE_LEN );
-       Client->info[CLIENT_MODE_LEN - 1] = '\0';
+       Client->modes[CLIENT_MODE_LEN - 1] = '\0';
 } /* Client_SetModes */
 
 
@@ -876,7 +883,6 @@ LOCAL CLIENT *New_Client_Struct( VOID )
        /* Neue CLIENT-Struktur pre-initialisieren */
        
        CLIENT *c;
-       INT i;
        
        c = malloc( sizeof( CLIENT ));
        if( ! c )
@@ -894,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;