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.95 2007/01/23 16:07:19 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 );
97 h = gethostbyname( This_Server->host );
98 if( h ) strlcpy( This_Server->host, h->h_name, sizeof( This_Server->host ));
100 Client_SetID( This_Server, Conf_ServerName );
101 Client_SetInfo( This_Server, Conf_ServerInfo );
103 My_Clients = This_Server;
105 memset( &My_Whowas, 0, sizeof( My_Whowas ));
115 if( NGIRCd_SignalRestart ) Client_Destroy( This_Server, "Server going down (restarting).", NULL, false );
116 else Client_Destroy( This_Server, "Server going down.", NULL, false );
123 next = (CLIENT *)c->next;
127 if( cnt ) Log( LOG_INFO, "Freed %d client structure%s.", cnt, cnt == 1 ? "" : "s" );
132 Client_ThisServer( void )
135 } /* Client_ThisServer */
139 * Initialize new local client; wrapper function for Init_New_Client().
140 * @return New CLIENT structure.
143 Client_NewLocal(CONN_ID Idx, char *Hostname, int Type, bool Idented)
145 return Init_New_Client(Idx, This_Server, NULL, Type, NULL, NULL,
146 Hostname, NULL, 0, 0, NULL, Idented);
147 } /* Client_NewLocal */
151 * Initialize new remote server; wrapper function for Init_New_Client().
152 * @return New CLIENT structure.
155 Client_NewRemoteServer(CLIENT *Introducer, char *Hostname, CLIENT *TopServer,
156 int Hops, int Token, char *Info, bool Idented)
158 return Init_New_Client(NONE, Introducer, TopServer, CLIENT_SERVER,
159 Hostname, NULL, Hostname, Info, Hops, Token, NULL, Idented);
160 } /* Client_NewRemoteServer */
164 * Initialize new remote client; wrapper function for Init_New_Client().
165 * @return New CLIENT structure.
168 Client_NewRemoteUser(CLIENT *Introducer, char *Nick, int Hops, char *User,
169 char *Hostname, int Token, char *Modes, char *Info, bool Idented)
171 return Init_New_Client(NONE, Introducer, NULL, CLIENT_USER, Nick,
172 User, Hostname, Info, Hops, Token, Modes, Idented);
173 } /* Client_NewRemoteUser */
177 * Initialize new client and set up the given parameters like client type,
178 * user name, host name, introducing server etc. ...
179 * @return New CLIENT structure.
182 Init_New_Client(CONN_ID Idx, CLIENT *Introducer, CLIENT *TopServer,
183 int Type, char *ID, char *User, char *Hostname, char *Info, int Hops,
184 int Token, char *Modes, bool Idented)
188 assert( Idx >= NONE );
189 assert( Introducer != NULL );
190 assert( Hostname != NULL );
192 client = New_Client_Struct( );
193 if( ! client ) return NULL;
196 client->starttime = time(NULL);
197 client->conn_id = Idx;
198 client->introducer = Introducer;
199 client->topserver = TopServer;
201 if( ID ) Client_SetID( client, ID );
202 if( User ) Client_SetUser( client, User, Idented );
203 if( Hostname ) Client_SetHostname( client, Hostname );
204 if( Info ) Client_SetInfo( client, Info );
206 client->token = Token;
207 if( Modes ) Client_SetModes( client, Modes );
208 if( Type == CLIENT_SERVER ) Generate_MyToken( client );
210 if( strchr( client->modes, 'a' ))
211 strlcpy( client->away, DEFAULT_AWAY_MSG, sizeof( client->away ));
214 client->next = (POINTER *)My_Clients;
217 /* Adjust counters */
218 Adjust_Counters( client );
221 } /* Init_New_Client */
225 Client_Destroy( CLIENT *Client, char *LogMsg, char *FwdMsg, bool SendQuit )
227 /* Client entfernen. */
230 char msg[LINE_LEN], *txt;
232 assert( Client != NULL );
234 if( LogMsg ) txt = LogMsg;
236 if( ! txt ) txt = "Reason unknown.";
238 /* Netz-Split-Nachricht vorbereiten (noch nicht optimal) */
239 if( Client->type == CLIENT_SERVER ) {
240 strlcpy(msg, This_Server->id, sizeof (msg));
241 strlcat(msg, " ", sizeof (msg));
242 strlcat(msg, Client->id, sizeof (msg));
249 if(( Client->type == CLIENT_SERVER ) && ( c->introducer == Client ) && ( c != Client ))
251 /* der Client, der geloescht wird ist ein Server. Der Client, den wir gerade
252 * pruefen, ist ein Child von diesem und muss daher auch entfernt werden */
253 Client_Destroy( c, NULL, msg, false );
260 /* Wir haben den Client gefunden: entfernen */
261 if( last ) last->next = c->next;
262 else My_Clients = (CLIENT *)c->next;
264 if( c->type == CLIENT_USER )
266 if( c->conn_id != NONE )
268 /* Ein lokaler User */
269 Log( LOG_NOTICE, "User \"%s\" unregistered (connection %d): %s", Client_Mask( c ), c->conn_id, txt );
273 /* Alle andere Server informieren! */
274 if( FwdMsg ) IRC_WriteStrServersPrefix( NULL, c, "QUIT :%s", FwdMsg );
275 else IRC_WriteStrServersPrefix( NULL, c, "QUIT :" );
281 Log( LOG_DEBUG, "User \"%s\" unregistered: %s", Client_Mask( c ), txt );
285 /* Andere Server informieren, ausser denen, die "in
286 * Richtung dem liegen", auf dem der User registriert
287 * ist. Von denen haben wir das QUIT ja wohl bekommen. */
288 if( FwdMsg ) IRC_WriteStrServersPrefix( Client_NextHop( c ), c, "QUIT :%s", FwdMsg );
289 else IRC_WriteStrServersPrefix( Client_NextHop( c ), c, "QUIT :" );
293 /* Unregister client from channels */
294 Channel_Quit( c, FwdMsg ? FwdMsg : c->id );
296 /* Register client in My_Whowas structure */
297 Client_RegisterWhowas( c );
299 else if( c->type == CLIENT_SERVER )
301 if( c != This_Server )
303 if( c->conn_id != NONE ) Log( LOG_NOTICE|LOG_snotice, "Server \"%s\" unregistered (connection %d): %s", c->id, c->conn_id, txt );
304 else Log( LOG_NOTICE|LOG_snotice, "Server \"%s\" unregistered: %s", c->id, txt );
307 /* andere Server informieren */
308 if( ! NGIRCd_SignalQuit )
310 if( FwdMsg ) IRC_WriteStrServersPrefix( Client_NextHop( c ), c, "SQUIT %s :%s", c->id, FwdMsg );
311 else IRC_WriteStrServersPrefix( Client_NextHop( c ), c, "SQUIT %s :", c->id );
316 if( c->conn_id != NONE )
318 if( c->id[0] ) Log( LOG_NOTICE, "Client \"%s\" unregistered (connection %d): %s", c->id, c->conn_id, txt );
319 else Log( LOG_NOTICE, "Client unregistered (connection %d): %s", c->conn_id, txt );
321 Log(LOG_WARNING, "Unregistered unknown client \"%s\": %s",
322 c->id[0] ? c->id : "(No Nick)", txt );
330 c = (CLIENT *)c->next;
332 } /* Client_Destroy */
336 Client_SetHostname( CLIENT *Client, char *Hostname )
338 /* Hostname eines Clients setzen */
340 assert( Client != NULL );
341 assert( Hostname != NULL );
343 strlcpy( Client->host, Hostname, sizeof( Client->host ));
344 } /* Client_SetHostname */
348 Client_SetID( CLIENT *Client, char *ID )
350 /* Hostname eines Clients setzen, Hash-Wert berechnen */
352 assert( Client != NULL );
353 assert( ID != NULL );
355 strlcpy( Client->id, ID, sizeof( Client->id ));
358 Client->hash = Hash( Client->id );
363 Client_SetUser( CLIENT *Client, char *User, bool Idented )
365 /* Username eines Clients setzen */
367 assert( Client != NULL );
368 assert( User != NULL );
370 if( Idented ) strlcpy( Client->user, User, sizeof( Client->user ));
373 Client->user[0] = '~';
374 strlcpy( Client->user + 1, User, sizeof( Client->user ) - 1 );
376 } /* Client_SetUser */
380 Client_SetInfo( CLIENT *Client, char *Info )
382 /* Hostname eines Clients setzen */
384 assert( Client != NULL );
385 assert( Info != NULL );
387 strlcpy( Client->info, Info, sizeof( Client->info ));
388 } /* Client_SetInfo */
392 Client_SetModes( CLIENT *Client, char *Modes )
394 /* Modes eines Clients setzen */
396 assert( Client != NULL );
397 assert( Modes != NULL );
399 strlcpy( Client->modes, Modes, sizeof( Client->modes ));
400 } /* Client_SetModes */
404 Client_SetFlags( CLIENT *Client, char *Flags )
406 /* Flags eines Clients setzen */
408 assert( Client != NULL );
409 assert( Flags != NULL );
411 strlcpy( Client->flags, Flags, sizeof( Client->flags ));
412 } /* Client_SetFlags */
416 Client_SetPassword( CLIENT *Client, char *Pwd )
418 /* Von einem Client geliefertes Passwort */
420 assert( Client != NULL );
421 assert( Pwd != NULL );
423 strlcpy( Client->pwd, Pwd, sizeof( Client->pwd ));
424 } /* Client_SetPassword */
428 Client_SetAway( CLIENT *Client, char *Txt )
430 /* Set AWAY reason of client */
432 assert( Client != NULL );
433 assert( Txt != NULL );
435 strlcpy( Client->away, Txt, sizeof( Client->away ));
436 Log( LOG_DEBUG, "User \"%s\" is away: %s", Client_Mask( Client ), Txt );
437 } /* Client_SetAway */
441 Client_SetType( CLIENT *Client, int Type )
443 assert( Client != NULL );
445 if( Type == CLIENT_SERVER ) Generate_MyToken( Client );
446 Adjust_Counters( Client );
447 } /* Client_SetType */
451 Client_SetHops( CLIENT *Client, int Hops )
453 assert( Client != NULL );
455 } /* Client_SetHops */
459 Client_SetToken( CLIENT *Client, int Token )
461 assert( Client != NULL );
462 Client->token = Token;
463 } /* Client_SetToken */
467 Client_SetIntroducer( CLIENT *Client, CLIENT *Introducer )
469 assert( Client != NULL );
470 assert( Introducer != NULL );
471 Client->introducer = Introducer;
472 } /* Client_SetIntroducer */
476 Client_SetOperByMe( CLIENT *Client, bool OperByMe )
478 assert( Client != NULL );
479 Client->oper_by_me = OperByMe;
480 } /* Client_SetOperByMe */
484 Client_ModeAdd( CLIENT *Client, char Mode )
487 * If Client already alread had Mode, return false.
488 * If the Mode was newly set, return true.
493 assert( Client != NULL );
495 x[0] = Mode; x[1] = '\0';
496 if( ! strchr( Client->modes, x[0] ))
498 /* Client hat den Mode noch nicht -> setzen */
499 strlcat( Client->modes, x, sizeof( Client->modes ));
503 } /* Client_ModeAdd */
507 Client_ModeDel( CLIENT *Client, char Mode )
510 * If Mode was removed, return true.
511 * If Client did not have Mode, return false.
516 assert( Client != NULL );
518 x[0] = Mode; x[1] = '\0';
520 p = strchr( Client->modes, x[0] );
521 if( ! p ) return false;
523 /* Client has Mode -> delete */
530 } /* Client_ModeDel */
534 Client_Search( char *Nick )
536 /* return Client-Structure that has the corresponding Nick.
537 * If none is found, return NULL.
540 char search_id[CLIENT_ID_LEN], *ptr;
544 assert( Nick != NULL );
546 /* copy Nick and truncate hostmask if necessary */
547 strlcpy( search_id, Nick, sizeof( search_id ));
548 ptr = strchr( search_id, '!' );
549 if( ptr ) *ptr = '\0';
551 search_hash = Hash( search_id );
556 if( c->hash == search_hash )
558 /* lt. Hash-Wert: Treffer! */
559 if( strcasecmp( c->id, search_id ) == 0 ) return c;
561 c = (CLIENT *)c->next;
564 } /* Client_Search */
568 Client_GetFromToken( CLIENT *Client, int Token )
570 /* Client-Struktur, die den entsprechenden Introducer (=Client)
571 * und das gegebene Token hat, liefern. Wird keine gefunden,
572 * so wird NULL geliefert. */
576 assert( Client != NULL );
582 if(( c->type == CLIENT_SERVER ) && ( c->introducer == Client ) && ( c->token == Token )) return c;
583 c = (CLIENT *)c->next;
586 } /* Client_GetFromToken */
590 Client_Type( CLIENT *Client )
592 assert( Client != NULL );
598 Client_Conn( CLIENT *Client )
600 assert( Client != NULL );
601 return Client->conn_id;
606 Client_ID( CLIENT *Client )
608 assert( Client != NULL );
611 if( Client->type == CLIENT_USER ) assert( strlen( Client->id ) < CLIENT_NICK_LEN );
614 if( Client->id[0] ) return Client->id;
620 Client_Info( CLIENT *Client )
622 assert( Client != NULL );
628 Client_User( CLIENT *Client )
630 assert( Client != NULL );
631 return Client->user[0] ? Client->user : "~";
636 Client_Hostname( CLIENT *Client )
638 assert( Client != NULL );
640 } /* Client_Hostname */
644 Client_Password( CLIENT *Client )
646 assert( Client != NULL );
648 } /* Client_Password */
652 Client_Modes( CLIENT *Client )
654 assert( Client != NULL );
655 return Client->modes;
660 Client_Flags( CLIENT *Client )
662 assert( Client != NULL );
663 return Client->flags;
668 Client_OperByMe( CLIENT *Client )
670 assert( Client != NULL );
671 return Client->oper_by_me;
672 } /* Client_OperByMe */
676 Client_Hops( CLIENT *Client )
678 assert( Client != NULL );
684 Client_Token( CLIENT *Client )
686 assert( Client != NULL );
687 return Client->token;
692 Client_MyToken( CLIENT *Client )
694 assert( Client != NULL );
695 return Client->mytoken;
696 } /* Client_MyToken */
700 Client_NextHop( CLIENT *Client )
704 assert( Client != NULL );
707 while( c->introducer && ( c->introducer != c ) && ( c->introducer != This_Server ))
711 } /* Client_NextHop */
715 Client_Mask( CLIENT *Client )
717 /* Client-"ID" liefern, wie sie z.B. fuer
718 * Prefixe benoetigt wird. */
720 assert( Client != NULL );
722 if( Client->type == CLIENT_SERVER ) return Client->id;
724 snprintf( GetID_Buffer, GETID_LEN, "%s!%s@%s", Client->id, Client->user, Client->host );
730 Client_Introducer( CLIENT *Client )
732 assert( Client != NULL );
733 return Client->introducer;
734 } /* Client_Introducer */
738 Client_TopServer( CLIENT *Client )
740 assert( Client != NULL );
741 return Client->topserver;
742 } /* Client_TopServer */
746 Client_HasMode( CLIENT *Client, char Mode )
748 assert( Client != NULL );
749 return strchr( Client->modes, Mode ) != NULL;
750 } /* Client_HasMode */
754 Client_Away( CLIENT *Client )
756 /* AWAY-Text liefern */
758 assert( Client != NULL );
764 Client_CheckNick( CLIENT *Client, char *Nick )
766 assert( Client != NULL );
767 assert( Nick != NULL );
769 if( ! Client_IsValidNick( Nick ))
771 IRC_WriteStrClient( Client, ERR_ERRONEUSNICKNAME_MSG, Client_ID( Client ), Nick );
775 /* Nick bereits vergeben? */
776 if( Client_Search( Nick ))
778 /* den Nick gibt es bereits */
779 IRC_WriteStrClient( Client, ERR_NICKNAMEINUSE_MSG, Client_ID( Client ), Nick );
784 } /* Client_CheckNick */
788 Client_CheckID( CLIENT *Client, char *ID )
790 /* Nick ueberpruefen */
792 char str[COMMAND_LEN];
795 assert( Client != NULL );
796 assert( Client->conn_id > NONE );
797 assert( ID != NULL );
800 if( strlen( ID ) > CLIENT_ID_LEN )
802 IRC_WriteStrClient( Client, ERR_ERRONEUSNICKNAME_MSG, Client_ID( Client ), ID );
806 /* ID bereits vergeben? */
810 if( strcasecmp( c->id, ID ) == 0 )
812 /* die Server-ID gibt es bereits */
813 snprintf( str, sizeof( str ), "ID \"%s\" already registered", ID );
814 if( Client->conn_id != c->conn_id ) Log( LOG_ERR, "%s (on connection %d)!", str, c->conn_id );
815 else Log( LOG_ERR, "%s (via network)!", str );
816 Conn_Close( Client->conn_id, str, str, true);
819 c = (CLIENT *)c->next;
823 } /* Client_CheckID */
829 /* Ersten Client liefern. */
836 Client_Next( CLIENT *c )
838 /* Naechsten Client liefern. Existiert keiner,
839 * so wird NULL geliefert. */
842 return (CLIENT *)c->next;
847 Client_UserCount( void )
849 return Count( CLIENT_USER );
850 } /* Client_UserCount */
854 Client_ServiceCount( void )
856 return Count( CLIENT_SERVICE );;
857 } /* Client_ServiceCount */
861 Client_ServerCount( void )
863 return Count( CLIENT_SERVER );
864 } /* Client_ServerCount */
868 Client_MyUserCount( void )
870 return MyCount( CLIENT_USER );
871 } /* Client_MyUserCount */
875 Client_MyServiceCount( void )
877 return MyCount( CLIENT_SERVICE );
878 } /* Client_MyServiceCount */
882 Client_MyServerCount( void )
885 unsigned long cnt = 0;
890 if(( c->type == CLIENT_SERVER ) && ( c->hops == 1 )) cnt++;
891 c = (CLIENT *)c->next;
894 } /* Client_MyServerCount */
898 Client_OperCount( void )
901 unsigned long cnt = 0;
906 if( c && ( c->type == CLIENT_USER ) && ( strchr( c->modes, 'o' ))) cnt++;
907 c = (CLIENT *)c->next;
910 } /* Client_OperCount */
914 Client_UnknownCount( void )
917 unsigned long cnt = 0;
922 if( c && ( c->type != CLIENT_USER ) && ( c->type != CLIENT_SERVICE ) && ( c->type != CLIENT_SERVER )) cnt++;
923 c = (CLIENT *)c->next;
927 } /* Client_UnknownCount */
931 Client_MaxUserCount( void )
934 } /* Client_MaxUserCount */
938 Client_MyMaxUserCount( void )
941 } /* Client_MyMaxUserCount */
945 Client_IsValidNick( const char *Nick )
948 static const char goodchars[] = ";0123456789-";
950 assert( Nick != NULL );
952 if( Nick[0] == '#' ) return false;
953 if( strchr( goodchars, Nick[0] )) return false;
954 if( strlen( Nick ) >= CLIENT_NICK_LEN ) return false;
959 if (( *ptr < 'A' ) && ( ! strchr( goodchars, *ptr ))) return false;
960 if ( *ptr > '}' ) return false;
965 } /* Client_IsValidNick */
969 * Return pointer to "My_Whowas" structure.
972 Client_GetWhowas( void )
975 } /* Client_GetWhowas */
978 * Return the index of the last used WHOWAS entry.
981 Client_GetLastWhowasIndex( void )
984 } /* Client_GetLastWhowasIndex */
988 * Get the start time of this client.
989 * The result is the start time in seconds since 1970-01-01, as reported
990 * by the C function time(NULL).
993 Client_StartTime(CLIENT *Client)
995 assert( Client != NULL );
996 return Client->starttime;
997 } /* Client_Uptime */
1000 static unsigned long
1001 Count( CLIENT_TYPE Type )
1004 unsigned long cnt = 0;
1009 if( c->type == Type ) cnt++;
1010 c = (CLIENT *)c->next;
1016 static unsigned long
1017 MyCount( CLIENT_TYPE Type )
1020 unsigned long cnt = 0;
1025 if(( c->introducer == This_Server ) && ( c->type == Type )) cnt++;
1026 c = (CLIENT *)c->next;
1033 New_Client_Struct( void )
1035 /* Neue CLIENT-Struktur pre-initialisieren */
1039 c = (CLIENT *)malloc( sizeof( CLIENT ));
1042 Log( LOG_EMERG, "Can't allocate memory! [New_Client_Struct]" );
1046 memset( c, 0, sizeof ( CLIENT ));
1048 c->type = CLIENT_UNKNOWN;
1050 c->oper_by_me = false;
1060 Generate_MyToken( CLIENT *Client )
1069 if( c->mytoken == token )
1071 /* Das Token wurde bereits vergeben */
1076 else c = (CLIENT *)c->next;
1078 Client->mytoken = token;
1079 Log( LOG_DEBUG, "Assigned token %d to server \"%s\".", token, Client->id );
1080 } /* Generate_MyToken */
1084 Adjust_Counters( CLIENT *Client )
1088 assert( Client != NULL );
1090 if( Client->type != CLIENT_USER ) return;
1092 if( Client->conn_id != NONE )
1094 /* Local connection */
1095 count = Client_MyUserCount( );
1096 if( count > My_Max_Users ) My_Max_Users = count;
1098 count = Client_UserCount( );
1099 if( count > Max_Users ) Max_Users = count;
1100 } /* Adjust_Counters */
1104 * Register client in My_Whowas structure for further recall by WHOWAS.
1105 * Note: Only clients that have been connected at least 30 seconds will be
1106 * registered to prevent automated IRC bots to "destroy" a nice server
1110 Client_RegisterWhowas( CLIENT *Client )
1115 assert( Client != NULL );
1118 /* Don't register clients that were connected less than 30 seconds. */
1119 if( now - Client->starttime < 30 )
1122 slot = Last_Whowas + 1;
1123 if( slot >= MAX_WHOWAS || slot < 0 ) slot = 0;
1126 Log( LOG_DEBUG, "Saving WHOWAS information to slot %d ...", slot );
1129 My_Whowas[slot].time = now;
1130 strlcpy( My_Whowas[slot].id, Client_ID( Client ),
1131 sizeof( My_Whowas[slot].id ));
1132 strlcpy( My_Whowas[slot].user, Client_User( Client ),
1133 sizeof( My_Whowas[slot].user ));
1134 strlcpy( My_Whowas[slot].host, Client_Hostname( Client ),
1135 sizeof( My_Whowas[slot].host ));
1136 strlcpy( My_Whowas[slot].info, Client_Info( Client ),
1137 sizeof( My_Whowas[slot].info ));
1138 strlcpy( My_Whowas[slot].server, Client_ID( Client_Introducer( Client )),
1139 sizeof( My_Whowas[slot].server ));
1142 } /* Client_RegisterWhowas */