commit - 0a13ff41eaf913dced5cd51c2440c6bb26fe8e6d
commit + c68c092ce33ea88629ed896413ff771c1878e2c1
blob - 51338021d462acf64adfd134d1515e4ea0384488
blob + e36dafd5678c30c268189774ff81ddb060ce5d0b
--- 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.43 2002/03/04 01:04:46 alex Exp $
+ * $Id: client.c,v 1.44 2002/03/06 14:30:43 alex Exp $
*
* client.c: Management aller Clients
*
* Server gewesen, so existiert eine entsprechende CONNECTION-Struktur.
*
* $Log: client.c,v $
+ * Revision 1.44 2002/03/06 14:30:43 alex
+ * - ein paar assert()-Tests ergaenzt.
+ *
* Revision 1.43 2002/03/04 01:04:46 alex
* - neuen Clients mit Mode "a" wird nun auch der Default-Away-Text gesetzt.
*
/* Hostname eines Clients setzen */
assert( Client != NULL );
+ assert( Hostname != NULL );
+
strncpy( Client->host, Hostname, CLIENT_HOST_LEN - 1 );
Client->host[CLIENT_HOST_LEN - 1] = '\0';
} /* Client_SetHostname */
/* Hostname eines Clients setzen */
assert( Client != NULL );
+ assert( ID != NULL );
+
strncpy( Client->id, ID, CLIENT_ID_LEN - 1 );
Client->id[CLIENT_ID_LEN - 1] = '\0';
} /* Client_SetID */
/* Username eines Clients setzen */
assert( Client != NULL );
+ assert( User != NULL );
+
if( Idented ) strncpy( Client->user, User, CLIENT_USER_LEN - 1 );
else
{
/* Hostname eines Clients setzen */
assert( Client != NULL );
+ assert( Info != NULL );
+
strncpy( Client->info, Info, CLIENT_INFO_LEN - 1 );
Client->info[CLIENT_INFO_LEN - 1] = '\0';
} /* Client_SetInfo */
/* Hostname eines Clients setzen */
assert( Client != NULL );
+ assert( Modes != NULL );
+
strncpy( Client->modes, Modes, CLIENT_MODE_LEN - 1 );
Client->modes[CLIENT_MODE_LEN - 1] = '\0';
} /* Client_SetModes */
/* Von einem Client geliefertes Passwort */
assert( Client != NULL );
+ assert( Pwd != NULL );
+
strncpy( Client->pwd, Pwd, CLIENT_PASS_LEN - 1 );
Client->pwd[CLIENT_PASS_LEN - 1] = '\0';
} /* Client_SetPassword */
GLOBAL VOID Client_SetIntroducer( CLIENT *Client, CLIENT *Introducer )
{
assert( Client != NULL );
+ assert( Introducer != NULL );
Client->introducer = Introducer;
} /* Client_SetIntroducer */
{
assert( Client != NULL );
+#ifdef DEBUG
+ if( Client->type == CLIENT_USER ) assert( strlen( Client->id ) < CLIENT_NICK_LEN );
+#endif
+
if( Client->id[0] ) return Client->id;
else return "*";
} /* Client_ID */