commit - 5ff42762cd46395692f792ea5f4b50fc412088cb
commit + c48544703dbb3b65d60e0c761c1391c598e0cb3e
blob - c44b55ea3e82c75d95106c636a9f061a31454343
blob + 3f37c805d85d66b0089ea3aa065728649a181f0b
--- src/ngircd/client.c
+++ src/ngircd/client.c
* 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.19 2002/01/04 01:21:22 alex Exp $
+ * $Id: client.c,v 1.20 2002/01/04 17:57:08 alex Exp $
*
* client.c: Management aller Clients
*
* Server gewesen, so existiert eine entsprechende CONNECTION-Struktur.
*
* $Log: client.c,v $
+ * Revision 1.20 2002/01/04 17:57:08 alex
+ * - Client_Destroy() an Server-Links angepasst.
+ *
* Revision 1.19 2002/01/04 01:21:22 alex
* - Client-Strukturen koennen von anderen Modulen nun nur noch ueber die
* enstprechenden (zum Teil neuen) Funktionen angesprochen werden.
CLIENT *last, *c;
assert( Client != NULL );
-
+
last = NULL;
c = My_Clients;
while( c )
{
+ if(( Client->type == CLIENT_SERVER ) && ( c->introducer == Client ) && ( c != Client ))
+ {
+ Client_Destroy( c );
+ last = NULL;
+ c = My_Clients;
+ continue;
+ }
if( c == Client )
{
if( last ) last->next = c->next;
else My_Clients = c->next;
- if( c->type == CLIENT_USER ) Log( LOG_NOTICE, "User \"%s!%s@%s\" exited (connection %d).", c->id, c->user, c->host, c->conn_id );
+ if( c->type == CLIENT_USER )
+ {
+ if( c->conn_id != NONE ) Log( LOG_NOTICE, "User \"%s!%s@%s\" exited (connection %d).", c->id, c->user, c->host, c->conn_id );
+ else Log( LOG_DEBUG, "User \"%s!%s@%s\" exited.", c->id, c->user, c->host );
+ }
+ else if( c->type == CLIENT_SERVER ) Log( LOG_NOTICE, "Server \"%s\" exited.", c->id );
+ else Log( LOG_NOTICE, "Unknown client \"%s\" exited.", c->id );
free( c );
break;
assert( Nick != NULL );
/* Nick zu lang? */
- if( strlen( Nick ) > CLIENT_NICK_LEN ) return IRC_WriteStrClient( Client, This_Server, ERR_ERRONEUSNICKNAME_MSG, Client_ID( Client ), Nick );
+ if( strlen( Nick ) > CLIENT_NICK_LEN ) return IRC_WriteStrClient( Client, ERR_ERRONEUSNICKNAME_MSG, Client_ID( Client ), Nick );
/* Nick bereits vergeben? */
c = My_Clients;
if( strcasecmp( c->id, Nick ) == 0 )
{
/* den Nick gibt es bereits */
- IRC_WriteStrClient( Client, This_Server, ERR_NICKNAMEINUSE_MSG, Client_ID( Client ), Nick );
+ IRC_WriteStrClient( Client, ERR_NICKNAMEINUSE_MSG, Client_ID( Client ), Nick );
return FALSE;
}
c = c->next;
assert( ID != NULL );
/* Nick zu lang? */
- if( strlen( ID ) > CLIENT_ID_LEN ) return IRC_WriteStrClient( Client, This_Server, ERR_ERRONEUSNICKNAME_MSG, Client_ID( Client ), ID );
+ if( strlen( ID ) > CLIENT_ID_LEN ) return IRC_WriteStrClient( Client, ERR_ERRONEUSNICKNAME_MSG, Client_ID( Client ), ID );
/* ID bereits vergeben? */
c = My_Clients;