2 * ngIRCd -- The Next Generation IRC Daemon
3 * Copyright (c)2001-2005 by Alexander Barton (alex@barton.de)
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 * Please read the file COPYING, README and AUTHORS for more information.
20 static char UNUSED id[] = "$Id: client.c,v 1.97 2007/11/21 12:16:36 alex Exp $";
43 #include "irc-write.h"
50 #define GETID_LEN (CLIENT_NICK_LEN-1) + 1 + (CLIENT_USER_LEN-1) + 1 + (CLIENT_HOST_LEN-1) + 1
53 static CLIENT *This_Server, *My_Clients;
54 static char GetID_Buffer[GETID_LEN];
56 static WHOWAS My_Whowas[MAX_WHOWAS];
57 static int Last_Whowas = -1;
60 static unsigned long Count PARAMS(( CLIENT_TYPE Type ));
61 static unsigned long MyCount PARAMS(( CLIENT_TYPE Type ));
63 static CLIENT *New_Client_Struct PARAMS(( void ));
64 static void Generate_MyToken PARAMS(( CLIENT *Client ));
65 static void Adjust_Counters PARAMS(( CLIENT *Client ));
67 static CLIENT *Init_New_Client PARAMS((CONN_ID Idx, CLIENT *Introducer,
68 CLIENT *TopServer, int Type, char *ID, char *User, char *Hostname,
69 char *Info, int Hops, int Token, char *Modes, bool Idented));
72 long Max_Users = 0, My_Max_Users = 0;
80 This_Server = New_Client_Struct( );
83 Log( LOG_EMERG, "Can't allocate client structure for server! Going down." );
84 Log( LOG_ALERT, "%s exiting due to fatal errors!", PACKAGE_NAME );
88 /* Client-Struktur dieses Servers */
89 This_Server->next = NULL;
90 This_Server->type = CLIENT_SERVER;
91 This_Server->conn_id = NONE;
92 This_Server->introducer = This_Server;
93 This_Server->mytoken = 1;
94 This_Server->hops = 0;
96 gethostname( This_Server->host, CLIENT_HOST_LEN );
98 h = gethostbyname( This_Server->host );
99 if (h) strlcpy(This_Server->host, h->h_name, sizeof(This_Server->host));
101 Client_SetID( This_Server, Conf_ServerName );
102 Client_SetInfo( This_Server, Conf_ServerInfo );
104 My_Clients = This_Server;
106 memset( &My_Whowas, 0, sizeof( My_Whowas ));
116 if( NGIRCd_SignalRestart ) Client_Destroy( This_Server, "Server going down (restarting).", NULL, false );
117 else Client_Destroy( This_Server, "Server going down.", NULL, false );
124 next = (CLIENT *)c->next;
128 if( cnt ) Log( LOG_INFO, "Freed %d client structure%s.", cnt, cnt == 1 ? "" : "s" );
133 Client_ThisServer( void )
136 } /* Client_ThisServer */
140 * Initialize new local client; wrapper function for Init_New_Client().
141 * @return New CLIENT structure.
144 Client_NewLocal(CONN_ID Idx, char *Hostname, int Type, bool Idented)
146 return Init_New_Client(Idx, This_Server, NULL, Type, NULL, NULL,
147 Hostname, NULL, 0, 0, NULL, Idented);
148 } /* Client_NewLocal */
152 * Initialize new remote server; wrapper function for Init_New_Client().
153 * @return New CLIENT structure.
156 Client_NewRemoteServer(CLIENT *Introducer, char *Hostname, CLIENT *TopServer,
157 int Hops, int Token, char *Info, bool Idented)
159 return Init_New_Client(NONE, Introducer, TopServer, CLIENT_SERVER,
160 Hostname, NULL, Hostname, Info, Hops, Token, NULL, Idented);
161 } /* Client_NewRemoteServer */
165 * Initialize new remote client; wrapper function for Init_New_Client().
166 * @return New CLIENT structure.
169 Client_NewRemoteUser(CLIENT *Introducer, char *Nick, int Hops, char *User,
170 char *Hostname, int Token, char *Modes, char *Info, bool Idented)
172 return Init_New_Client(NONE, Introducer, NULL, CLIENT_USER, Nick,
173 User, Hostname, Info, Hops, Token, Modes, Idented);
174 } /* Client_NewRemoteUser */
178 * Initialize new client and set up the given parameters like client type,
179 * user name, host name, introducing server etc. ...
180 * @return New CLIENT structure.
183 Init_New_Client(CONN_ID Idx, CLIENT *Introducer, CLIENT *TopServer,
184 int Type, char *ID, char *User, char *Hostname, char *Info, int Hops,
185 int Token, char *Modes, bool Idented)
189 assert( Idx >= NONE );
190 assert( Introducer != NULL );
191 assert( Hostname != NULL );
193 client = New_Client_Struct( );
194 if( ! client ) return NULL;
197 client->starttime = time(NULL);
198 client->conn_id = Idx;
199 client->introducer = Introducer;
200 client->topserver = TopServer;
202 if( ID ) Client_SetID( client, ID );
203 if( User ) Client_SetUser( client, User, Idented );
204 if( Hostname ) Client_SetHostname( client, Hostname );
205 if( Info ) Client_SetInfo( client, Info );
207 client->token = Token;
208 if( Modes ) Client_SetModes( client, Modes );
209 if( Type == CLIENT_SERVER ) Generate_MyToken( client );
211 if( strchr( client->modes, 'a' ))
212 strlcpy( client->away, DEFAULT_AWAY_MSG, sizeof( client->away ));
215 client->next = (POINTER *)My_Clients;
218 /* Adjust counters */
219 Adjust_Counters( client );
222 } /* Init_New_Client */
226 Client_Destroy( CLIENT *Client, char *LogMsg, char *FwdMsg, bool SendQuit )
228 /* Client entfernen. */
231 char msg[LINE_LEN], *txt;
233 assert( Client != NULL );
235 if( LogMsg ) txt = LogMsg;
237 if( ! txt ) txt = "Reason unknown.";
239 /* Netz-Split-Nachricht vorbereiten (noch nicht optimal) */
240 if( Client->type == CLIENT_SERVER ) {
241 strlcpy(msg, This_Server->id, sizeof (msg));
242 strlcat(msg, " ", sizeof (msg));
243 strlcat(msg, Client->id, sizeof (msg));
250 if(( Client->type == CLIENT_SERVER ) && ( c->introducer == Client ) && ( c != Client ))
252 /* der Client, der geloescht wird ist ein Server. Der Client, den wir gerade
253 * pruefen, ist ein Child von diesem und muss daher auch entfernt werden */
254 Client_Destroy( c, NULL, msg, false );
261 /* Wir haben den Client gefunden: entfernen */
262 if( last ) last->next = c->next;
263 else My_Clients = (CLIENT *)c->next;
265 if( c->type == CLIENT_USER )
267 if( c->conn_id != NONE )
269 /* Ein lokaler User */
270 Log( LOG_NOTICE, "User \"%s\" unregistered (connection %d): %s", Client_Mask( c ), c->conn_id, txt );
274 /* Alle andere Server informieren! */
275 if( FwdMsg ) IRC_WriteStrServersPrefix( NULL, c, "QUIT :%s", FwdMsg );
276 else IRC_WriteStrServersPrefix( NULL, c, "QUIT :" );
282 Log( LOG_DEBUG, "User \"%s\" unregistered: %s", Client_Mask( c ), txt );
286 /* Andere Server informieren, ausser denen, die "in
287 * Richtung dem liegen", auf dem der User registriert
288 * ist. Von denen haben wir das QUIT ja wohl bekommen. */
289 if( FwdMsg ) IRC_WriteStrServersPrefix( Client_NextHop( c ), c, "QUIT :%s", FwdMsg );
290 else IRC_WriteStrServersPrefix( Client_NextHop( c ), c, "QUIT :" );
294 /* Unregister client from channels */
295 Channel_Quit( c, FwdMsg ? FwdMsg : c->id );
297 /* Register client in My_Whowas structure */
298 Client_RegisterWhowas( c );
300 else if( c->type == CLIENT_SERVER )
302 if( c != This_Server )
304 if( c->conn_id != NONE ) Log( LOG_NOTICE|LOG_snotice, "Server \"%s\" unregistered (connection %d): %s", c->id, c->conn_id, txt );
305 else Log( LOG_NOTICE|LOG_snotice, "Server \"%s\" unregistered: %s", c->id, txt );
308 /* andere Server informieren */
309 if( ! NGIRCd_SignalQuit )
311 if( FwdMsg ) IRC_WriteStrServersPrefix( Client_NextHop( c ), c, "SQUIT %s :%s", c->id, FwdMsg );
312 else IRC_WriteStrServersPrefix( Client_NextHop( c ), c, "SQUIT %s :", c->id );
317 if( c->conn_id != NONE )
319 if( c->id[0] ) Log( LOG_NOTICE, "Client \"%s\" unregistered (connection %d): %s", c->id, c->conn_id, txt );
320 else Log( LOG_NOTICE, "Client unregistered (connection %d): %s", c->conn_id, txt );
322 Log(LOG_WARNING, "Unregistered unknown client \"%s\": %s",
323 c->id[0] ? c->id : "(No Nick)", txt );
331 c = (CLIENT *)c->next;
333 } /* Client_Destroy */
337 Client_SetHostname( CLIENT *Client, char *Hostname )
339 /* Hostname eines Clients setzen */
341 assert( Client != NULL );
342 assert( Hostname != NULL );
344 strlcpy( Client->host, Hostname, sizeof( Client->host ));
345 } /* Client_SetHostname */
349 Client_SetID( CLIENT *Client, char *ID )
351 /* Hostname eines Clients setzen, Hash-Wert berechnen */
353 assert( Client != NULL );
354 assert( ID != NULL );
356 strlcpy( Client->id, ID, sizeof( Client->id ));
359 Client->hash = Hash( Client->id );
364 Client_SetUser( CLIENT *Client, char *User, bool Idented )
366 /* Username eines Clients setzen */
368 assert( Client != NULL );
369 assert( User != NULL );
371 if( Idented ) strlcpy( Client->user, User, sizeof( Client->user ));
374 Client->user[0] = '~';
375 strlcpy( Client->user + 1, User, sizeof( Client->user ) - 1 );
377 } /* Client_SetUser */
381 Client_SetInfo( CLIENT *Client, char *Info )
383 /* Hostname eines Clients setzen */
385 assert( Client != NULL );
386 assert( Info != NULL );
388 strlcpy( Client->info, Info, sizeof( Client->info ));
389 } /* Client_SetInfo */
393 Client_SetModes( CLIENT *Client, char *Modes )
395 /* Modes eines Clients setzen */
397 assert( Client != NULL );
398 assert( Modes != NULL );
400 strlcpy( Client->modes, Modes, sizeof( Client->modes ));
401 } /* Client_SetModes */
405 Client_SetFlags( CLIENT *Client, char *Flags )
407 /* Flags eines Clients setzen */
409 assert( Client != NULL );
410 assert( Flags != NULL );
412 strlcpy( Client->flags, Flags, sizeof( Client->flags ));
413 } /* Client_SetFlags */
417 Client_SetPassword( CLIENT *Client, char *Pwd )
419 /* Von einem Client geliefertes Passwort */
421 assert( Client != NULL );
422 assert( Pwd != NULL );
424 strlcpy( Client->pwd, Pwd, sizeof( Client->pwd ));
425 } /* Client_SetPassword */
429 Client_SetAway( CLIENT *Client, char *Txt )
431 /* Set AWAY reason of client */
433 assert( Client != NULL );
434 assert( Txt != NULL );
436 strlcpy( Client->away, Txt, sizeof( Client->away ));
437 Log( LOG_DEBUG, "User \"%s\" is away: %s", Client_Mask( Client ), Txt );
438 } /* Client_SetAway */
442 Client_SetType( CLIENT *Client, int Type )
444 assert( Client != NULL );
446 if( Type == CLIENT_SERVER ) Generate_MyToken( Client );
447 Adjust_Counters( Client );
448 } /* Client_SetType */
452 Client_SetHops( CLIENT *Client, int Hops )
454 assert( Client != NULL );
456 } /* Client_SetHops */
460 Client_SetToken( CLIENT *Client, int Token )
462 assert( Client != NULL );
463 Client->token = Token;
464 } /* Client_SetToken */
468 Client_SetIntroducer( CLIENT *Client, CLIENT *Introducer )
470 assert( Client != NULL );
471 assert( Introducer != NULL );
472 Client->introducer = Introducer;
473 } /* Client_SetIntroducer */
477 Client_SetOperByMe( CLIENT *Client, bool OperByMe )
479 assert( Client != NULL );
480 Client->oper_by_me = OperByMe;
481 } /* Client_SetOperByMe */
485 Client_ModeAdd( CLIENT *Client, char Mode )
488 * If Client already alread had Mode, return false.
489 * If the Mode was newly set, return true.
494 assert( Client != NULL );
496 x[0] = Mode; x[1] = '\0';
497 if( ! strchr( Client->modes, x[0] ))
499 /* Client hat den Mode noch nicht -> setzen */
500 strlcat( Client->modes, x, sizeof( Client->modes ));
504 } /* Client_ModeAdd */
508 Client_ModeDel( CLIENT *Client, char Mode )
511 * If Mode was removed, return true.
512 * If Client did not have Mode, return false.
517 assert( Client != NULL );
519 x[0] = Mode; x[1] = '\0';
521 p = strchr( Client->modes, x[0] );
522 if( ! p ) return false;
524 /* Client has Mode -> delete */
531 } /* Client_ModeDel */
535 Client_Search( char *Nick )
537 /* return Client-Structure that has the corresponding Nick.
538 * If none is found, return NULL.
541 char search_id[CLIENT_ID_LEN], *ptr;
545 assert( Nick != NULL );
547 /* copy Nick and truncate hostmask if necessary */
548 strlcpy( search_id, Nick, sizeof( search_id ));
549 ptr = strchr( search_id, '!' );
550 if( ptr ) *ptr = '\0';
552 search_hash = Hash( search_id );
557 if( c->hash == search_hash )
559 /* lt. Hash-Wert: Treffer! */
560 if( strcasecmp( c->id, search_id ) == 0 ) return c;
562 c = (CLIENT *)c->next;
565 } /* Client_Search */
569 Client_GetFromToken( CLIENT *Client, int Token )
571 /* Client-Struktur, die den entsprechenden Introducer (=Client)
572 * und das gegebene Token hat, liefern. Wird keine gefunden,
573 * so wird NULL geliefert. */
577 assert( Client != NULL );
583 if(( c->type == CLIENT_SERVER ) && ( c->introducer == Client ) && ( c->token == Token )) return c;
584 c = (CLIENT *)c->next;
587 } /* Client_GetFromToken */
591 Client_Type( CLIENT *Client )
593 assert( Client != NULL );
599 Client_Conn( CLIENT *Client )
601 assert( Client != NULL );
602 return Client->conn_id;
607 Client_ID( CLIENT *Client )
609 assert( Client != NULL );
612 if(Client->type == CLIENT_USER)
613 assert(strlen(Client->id) < Conf_MaxNickLength);
616 if( Client->id[0] ) return Client->id;
622 Client_Info( CLIENT *Client )
624 assert( Client != NULL );
630 Client_User( CLIENT *Client )
632 assert( Client != NULL );
633 return Client->user[0] ? Client->user : "~";
638 Client_Hostname( CLIENT *Client )
640 assert( Client != NULL );
642 } /* Client_Hostname */
646 Client_Password( CLIENT *Client )
648 assert( Client != NULL );
650 } /* Client_Password */
654 Client_Modes( CLIENT *Client )
656 assert( Client != NULL );
657 return Client->modes;
662 Client_Flags( CLIENT *Client )
664 assert( Client != NULL );
665 return Client->flags;
670 Client_OperByMe( CLIENT *Client )
672 assert( Client != NULL );
673 return Client->oper_by_me;
674 } /* Client_OperByMe */
678 Client_Hops( CLIENT *Client )
680 assert( Client != NULL );
686 Client_Token( CLIENT *Client )
688 assert( Client != NULL );
689 return Client->token;
694 Client_MyToken( CLIENT *Client )
696 assert( Client != NULL );
697 return Client->mytoken;
698 } /* Client_MyToken */
702 Client_NextHop( CLIENT *Client )
706 assert( Client != NULL );
709 while( c->introducer && ( c->introducer != c ) && ( c->introducer != This_Server ))
713 } /* Client_NextHop */
717 Client_Mask( CLIENT *Client )
719 /* Client-"ID" liefern, wie sie z.B. fuer
720 * Prefixe benoetigt wird. */
722 assert( Client != NULL );
724 if( Client->type == CLIENT_SERVER ) return Client->id;
726 snprintf( GetID_Buffer, GETID_LEN, "%s!%s@%s", Client->id, Client->user, Client->host );
732 Client_Introducer( CLIENT *Client )
734 assert( Client != NULL );
735 return Client->introducer;
736 } /* Client_Introducer */
740 Client_TopServer( CLIENT *Client )
742 assert( Client != NULL );
743 return Client->topserver;
744 } /* Client_TopServer */
748 Client_HasMode( CLIENT *Client, char Mode )
750 assert( Client != NULL );
751 return strchr( Client->modes, Mode ) != NULL;
752 } /* Client_HasMode */
756 Client_Away( CLIENT *Client )
758 /* AWAY-Text liefern */
760 assert( Client != NULL );
766 Client_CheckNick( CLIENT *Client, char *Nick )
768 assert( Client != NULL );
769 assert( Nick != NULL );
771 if( ! Client_IsValidNick( Nick ))
773 IRC_WriteStrClient( Client, ERR_ERRONEUSNICKNAME_MSG, Client_ID( Client ), Nick );
777 /* Nick bereits vergeben? */
778 if( Client_Search( Nick ))
780 /* den Nick gibt es bereits */
781 IRC_WriteStrClient( Client, ERR_NICKNAMEINUSE_MSG, Client_ID( Client ), Nick );
786 } /* Client_CheckNick */
790 Client_CheckID( CLIENT *Client, char *ID )
792 /* Nick ueberpruefen */
794 char str[COMMAND_LEN];
797 assert( Client != NULL );
798 assert( Client->conn_id > NONE );
799 assert( ID != NULL );
802 if( strlen( ID ) > CLIENT_ID_LEN )
804 IRC_WriteStrClient( Client, ERR_ERRONEUSNICKNAME_MSG, Client_ID( Client ), ID );
808 /* ID bereits vergeben? */
812 if( strcasecmp( c->id, ID ) == 0 )
814 /* die Server-ID gibt es bereits */
815 snprintf( str, sizeof( str ), "ID \"%s\" already registered", ID );
816 if( Client->conn_id != c->conn_id ) Log( LOG_ERR, "%s (on connection %d)!", str, c->conn_id );
817 else Log( LOG_ERR, "%s (via network)!", str );
818 Conn_Close( Client->conn_id, str, str, true);
821 c = (CLIENT *)c->next;
825 } /* Client_CheckID */
831 /* Ersten Client liefern. */
838 Client_Next( CLIENT *c )
840 /* Naechsten Client liefern. Existiert keiner,
841 * so wird NULL geliefert. */
844 return (CLIENT *)c->next;
849 Client_UserCount( void )
851 return Count( CLIENT_USER );
852 } /* Client_UserCount */
856 Client_ServiceCount( void )
858 return Count( CLIENT_SERVICE );;
859 } /* Client_ServiceCount */
863 Client_ServerCount( void )
865 return Count( CLIENT_SERVER );
866 } /* Client_ServerCount */
870 Client_MyUserCount( void )
872 return MyCount( CLIENT_USER );
873 } /* Client_MyUserCount */
877 Client_MyServiceCount( void )
879 return MyCount( CLIENT_SERVICE );
880 } /* Client_MyServiceCount */
884 Client_MyServerCount( void )
887 unsigned long cnt = 0;
892 if(( c->type == CLIENT_SERVER ) && ( c->hops == 1 )) cnt++;
893 c = (CLIENT *)c->next;
896 } /* Client_MyServerCount */
900 Client_OperCount( void )
903 unsigned long cnt = 0;
908 if( c && ( c->type == CLIENT_USER ) && ( strchr( c->modes, 'o' ))) cnt++;
909 c = (CLIENT *)c->next;
912 } /* Client_OperCount */
916 Client_UnknownCount( void )
919 unsigned long cnt = 0;
924 if( c && ( c->type != CLIENT_USER ) && ( c->type != CLIENT_SERVICE ) && ( c->type != CLIENT_SERVER )) cnt++;
925 c = (CLIENT *)c->next;
929 } /* Client_UnknownCount */
933 Client_MaxUserCount( void )
936 } /* Client_MaxUserCount */
940 Client_MyMaxUserCount( void )
943 } /* Client_MyMaxUserCount */
947 Client_IsValidNick( const char *Nick )
950 static const char goodchars[] = ";0123456789-";
952 assert( Nick != NULL );
954 if( Nick[0] == '#' ) return false;
955 if( strchr( goodchars, Nick[0] )) return false;
956 if( strlen( Nick ) >= Conf_MaxNickLength) return false;
961 if (( *ptr < 'A' ) && ( ! strchr( goodchars, *ptr ))) return false;
962 if ( *ptr > '}' ) return false;
967 } /* Client_IsValidNick */
971 * Return pointer to "My_Whowas" structure.
974 Client_GetWhowas( void )
977 } /* Client_GetWhowas */
980 * Return the index of the last used WHOWAS entry.
983 Client_GetLastWhowasIndex( void )
986 } /* Client_GetLastWhowasIndex */
990 * Get the start time of this client.
991 * The result is the start time in seconds since 1970-01-01, as reported
992 * by the C function time(NULL).
995 Client_StartTime(CLIENT *Client)
997 assert( Client != NULL );
998 return Client->starttime;
999 } /* Client_Uptime */
1002 static unsigned long
1003 Count( CLIENT_TYPE Type )
1006 unsigned long cnt = 0;
1011 if( c->type == Type ) cnt++;
1012 c = (CLIENT *)c->next;
1018 static unsigned long
1019 MyCount( CLIENT_TYPE Type )
1022 unsigned long cnt = 0;
1027 if(( c->introducer == This_Server ) && ( c->type == Type )) cnt++;
1028 c = (CLIENT *)c->next;
1035 New_Client_Struct( void )
1037 /* Neue CLIENT-Struktur pre-initialisieren */
1041 c = (CLIENT *)malloc( sizeof( CLIENT ));
1044 Log( LOG_EMERG, "Can't allocate memory! [New_Client_Struct]" );
1048 memset( c, 0, sizeof ( CLIENT ));
1050 c->type = CLIENT_UNKNOWN;
1052 c->oper_by_me = false;
1062 Generate_MyToken( CLIENT *Client )
1071 if( c->mytoken == token )
1073 /* Das Token wurde bereits vergeben */
1078 else c = (CLIENT *)c->next;
1080 Client->mytoken = token;
1081 Log( LOG_DEBUG, "Assigned token %d to server \"%s\".", token, Client->id );
1082 } /* Generate_MyToken */
1086 Adjust_Counters( CLIENT *Client )
1090 assert( Client != NULL );
1092 if( Client->type != CLIENT_USER ) return;
1094 if( Client->conn_id != NONE )
1096 /* Local connection */
1097 count = Client_MyUserCount( );
1098 if( count > My_Max_Users ) My_Max_Users = count;
1100 count = Client_UserCount( );
1101 if( count > Max_Users ) Max_Users = count;
1102 } /* Adjust_Counters */
1106 * Register client in My_Whowas structure for further recall by WHOWAS.
1107 * Note: Only clients that have been connected at least 30 seconds will be
1108 * registered to prevent automated IRC bots to "destroy" a nice server
1112 Client_RegisterWhowas( CLIENT *Client )
1117 assert( Client != NULL );
1120 /* Don't register clients that were connected less than 30 seconds. */
1121 if( now - Client->starttime < 30 )
1124 slot = Last_Whowas + 1;
1125 if( slot >= MAX_WHOWAS || slot < 0 ) slot = 0;
1128 Log( LOG_DEBUG, "Saving WHOWAS information to slot %d ...", slot );
1131 My_Whowas[slot].time = now;
1132 strlcpy( My_Whowas[slot].id, Client_ID( Client ),
1133 sizeof( My_Whowas[slot].id ));
1134 strlcpy( My_Whowas[slot].user, Client_User( Client ),
1135 sizeof( My_Whowas[slot].user ));
1136 strlcpy( My_Whowas[slot].host, Client_Hostname( Client ),
1137 sizeof( My_Whowas[slot].host ));
1138 strlcpy( My_Whowas[slot].info, Client_Info( Client ),
1139 sizeof( My_Whowas[slot].info ));
1140 strlcpy( My_Whowas[slot].server, Client_ID( Client_Introducer( Client )),
1141 sizeof( My_Whowas[slot].server ));
1144 } /* Client_RegisterWhowas */