2 * ngIRCd -- The Next Generation IRC Daemon
3 * Copyright (c)2001-2008 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.
26 #include "conn-func.h"
35 #include "irc-write.h"
38 #include "irc-login.h"
41 static bool Hello_User PARAMS(( CLIENT *Client ));
42 static void Kill_Nick PARAMS(( char *Nick, char *Reason ));
43 static void Introduce_Client PARAMS((CLIENT *To, CLIENT *Client, int Type));
44 static void cb_introduceClient PARAMS((CLIENT *Client, CLIENT *Prefix,
49 * Handler for the IRC command "PASS".
50 * See RFC 2813 section 4.1.1, and RFC 2812 section 3.1.1.
53 IRC_PASS( CLIENT *Client, REQUEST *Req )
55 char *type, *orig_flags;
56 int protohigh, protolow;
58 assert( Client != NULL );
59 assert( Req != NULL );
61 /* Return an error if this is not a local client */
62 if (Client_Conn(Client) <= NONE)
63 return IRC_WriteStrClient(Client, ERR_UNKNOWNCOMMAND_MSG,
64 Client_ID(Client), Req->command);
66 if (Client_Type(Client) == CLIENT_UNKNOWN && Req->argc == 1) {
67 /* Not yet registered "unknown" connection, PASS with one
68 * argument: either a regular client, service, or server
69 * using the old RFC 1459 section 4.1.1 syntax. */
70 LogDebug("Connection %d: got PASS command (RFC 1459) ...",
72 } else if ((Client_Type(Client) == CLIENT_UNKNOWN ||
73 Client_Type(Client) == CLIENT_UNKNOWNSERVER) &&
74 (Req->argc == 3 || Req->argc == 4)) {
75 /* Not yet registered "unknown" connection or outgoing server
76 * link, PASS with three or four argument: server using the
77 * RFC 2813 section 4.1.1 syntax. */
78 LogDebug("Connection %d: got PASS command (RFC 2813, new server link) ...",
80 } else if (Client_Type(Client) == CLIENT_UNKNOWN ||
81 Client_Type(Client) == CLIENT_UNKNOWNSERVER) {
82 /* Unregistered connection, but wrong number of arguments: */
83 return IRC_WriteStrClient(Client, ERR_NEEDMOREPARAMS_MSG,
84 Client_ID(Client), Req->command);
86 /* Registered connection, PASS command is not allowed! */
87 return IRC_WriteStrClient(Client, ERR_ALREADYREGISTRED_MSG,
91 Client_SetPassword(Client, Req->argv[0]);
93 /* Protocol version */
94 if (Req->argc >= 2 && strlen(Req->argv[1]) >= 4) {
100 Req->argv[1][4] = '\0';
101 protolow = atoi(&Req->argv[1][2]);
102 Req->argv[1][2] = '\0';
103 protohigh = atoi(Req->argv[1]);
105 Req->argv[1][2] = c2;
106 Req->argv[1][4] = c4;
108 Client_SetType(Client, CLIENT_GOTPASS_2813);
110 protohigh = protolow = 0;
111 Client_SetType(Client, CLIENT_GOTPASS);
114 /* Protocol type, see doc/Protocol.txt */
115 if (Req->argc >= 2 && strlen(Req->argv[1]) > 4)
116 type = &Req->argv[1][4];
120 /* Protocol flags/options */
122 orig_flags = Req->argv[3];
126 /* Implementation, version and IRC+ flags */
127 if (Req->argc >= 3) {
128 char *impl, *ptr, *serverver, *flags;
131 ptr = strchr(impl, '|');
135 if (type && strcmp(type, PROTOIRCPLUS) == 0) {
136 /* The peer seems to be a server which supports the
137 * IRC+ protocol (see doc/Protocol.txt). */
139 flags = strchr(serverver, ':');
146 "Peer announces itself as %s-%s using protocol %d.%d/IRC+ (flags: \"%s\").",
147 impl, serverver, protohigh, protolow, flags);
149 /* The peer seems to be a server supporting the
150 * "original" IRC protocol (RFC 2813). */
151 if (strchr(orig_flags, 'Z'))
156 "Peer announces itself as \"%s\" using protocol %d.%d (flags: \"%s\").",
157 impl, protohigh, protolow, flags);
159 Client_SetFlags(Client, flags);
167 * IRC "NICK" command.
168 * This function implements the IRC command "NICK" which is used to register
169 * with the server, to change already registered nicknames and to introduce
170 * new users which are connected to other servers.
173 IRC_NICK( CLIENT *Client, REQUEST *Req )
175 CLIENT *intr_c, *target, *c;
176 char *nick, *user, *hostname, *modes, *info;
179 assert( Client != NULL );
180 assert( Req != NULL );
182 /* Some IRC clients, for example BitchX, send the NICK and USER
183 * commands in the wrong order ... */
184 if(Client_Type(Client) == CLIENT_UNKNOWN
185 || Client_Type(Client) == CLIENT_GOTPASS
186 || Client_Type(Client) == CLIENT_GOTNICK
188 || Client_Type(Client) == CLIENT_GOTUSER
190 || Client_Type(Client) == CLIENT_USER
191 || Client_Type(Client) == CLIENT_SERVICE
192 || (Client_Type(Client) == CLIENT_SERVER && Req->argc == 1))
194 /* User registration or change of nickname */
196 /* Wrong number of arguments? */
198 return IRC_WriteStrClient( Client, ERR_NEEDMOREPARAMS_MSG,
202 /* Search "target" client */
203 if( Client_Type( Client ) == CLIENT_SERVER )
205 target = Client_Search( Req->prefix );
207 return IRC_WriteStrClient( Client,
214 /* Is this a restricted client? */
215 if( Client_HasMode( Client, 'r' ))
216 return IRC_WriteStrClient( Client,
218 Client_ID( Client ));
224 /* If the clients tries to change to its own nickname we won't
225 * do anything. This is how the original ircd behaves and some
226 * clients (for example Snak) expect it to be like this.
227 * But I doubt that this is "really the right thing" ... */
228 if( strcmp( Client_ID( target ), Req->argv[0] ) == 0 )
232 /* Check that the new nickname is available. Special case:
233 * the client only changes from/to upper to lower case. */
234 if( strcasecmp( Client_ID( target ), Req->argv[0] ) != 0 )
236 if( ! Client_CheckNick( target, Req->argv[0] ))
240 if (Client_Type(target) != CLIENT_USER &&
241 Client_Type(target) != CLIENT_SERVICE &&
242 Client_Type(target) != CLIENT_SERVER) {
244 LogDebug("Connection %d: got valid NICK command ...",
245 Client_Conn( Client ));
247 /* Register new nickname of this client */
248 Client_SetID( target, Req->argv[0] );
250 /* If we received a valid USER command already then
251 * register the new client! */
252 if( Client_Type( Client ) == CLIENT_GOTUSER )
253 return Hello_User( Client );
255 Client_SetType( Client, CLIENT_GOTNICK );
257 /* Nickname change */
258 if (Client_Conn(target) > NONE) {
261 "%s \"%s\" changed nick (connection %d): \"%s\" -> \"%s\".",
262 Client_TypeText(target), Client_Mask(target),
263 Client_Conn(target), Client_ID(target),
265 Conn_UpdateIdle(Client_Conn(target));
268 LogDebug("%s \"%s\" changed nick: \"%s\" -> \"%s\".",
269 Client_TypeText(target),
270 Client_Mask(target), Client_ID(target),
274 /* Inform all users and servers (which have to know)
275 * of this nickname change */
276 if( Client_Type( Client ) == CLIENT_USER )
277 IRC_WriteStrClientPrefix( Client, Client,
280 IRC_WriteStrServersPrefix( Client, target,
281 "NICK :%s", Req->argv[0] );
282 IRC_WriteStrRelatedPrefix( target, target, false,
283 "NICK :%s", Req->argv[0] );
285 /* Register old nickname for WHOWAS queries */
286 Client_RegisterWhowas( target );
288 /* Save new nickname */
289 Client_SetID( target, Req->argv[0] );
291 IRC_SetPenalty( target, 2 );
295 } else if(Client_Type(Client) == CLIENT_SERVER ||
296 Client_Type(Client) == CLIENT_SERVICE) {
297 /* Server or service introduces new client */
299 /* Bad number of parameters? */
300 if (Req->argc != 2 && Req->argc != 7)
301 return IRC_WriteStrClient(Client, ERR_NEEDMOREPARAMS_MSG,
302 Client_ID(Client), Req->command);
304 if (Req->argc >= 7) {
305 /* RFC 2813 compatible syntax */
307 hops = atoi(Req->argv[1]);
309 hostname = Req->argv[3];
310 token = atoi(Req->argv[4]);
311 modes = Req->argv[5] + 1;
314 /* RFC 1459 compatible syntax */
318 hostname = Client_ID(Client);
319 token = atoi(Req->argv[1]);
324 c = Client_Search(nick);
327 * the new nick is already present on this server:
328 * the new and the old one have to be disconnected now.
330 Log( LOG_ERR, "Server %s introduces already registered nick \"%s\"!", Client_ID( Client ), Req->argv[0] );
331 Kill_Nick( Req->argv[0], "Nick collision" );
335 /* Find the Server this client is connected to */
336 intr_c = Client_GetFromToken(Client, token);
339 Log( LOG_ERR, "Server %s introduces nick \"%s\" on unknown server!?", Client_ID( Client ), Req->argv[0] );
340 Kill_Nick( Req->argv[0], "Unknown server" );
344 c = Client_NewRemoteUser(intr_c, nick, hops, user, hostname,
345 token, modes, info, true);
348 /* out of memory, need to disconnect client to keep network state consistent */
349 Log( LOG_ALERT, "Can't create client structure! (on connection %d)", Client_Conn( Client ));
350 Kill_Nick( Req->argv[0], "Server error" );
354 /* RFC 2813: client is now fully registered, inform all the
355 * other servers about the new user.
356 * RFC 1459: announce the new client only after receiving the
357 * USER command, first we need more information! */
359 LogDebug("Client \"%s\" is beeing registered (RFC 1459) ...",
361 Client_SetType(c, CLIENT_GOTNICK);
363 Introduce_Client(Client, c, CLIENT_USER);
367 else return IRC_WriteStrClient( Client, ERR_ALREADYREGISTRED_MSG, Client_ID( Client ));
372 * Handler for the IRC command "USER".
375 IRC_USER(CLIENT * Client, REQUEST * Req)
382 assert(Client != NULL);
385 if (Client_Type(Client) == CLIENT_GOTNICK ||
387 Client_Type(Client) == CLIENT_UNKNOWN ||
389 Client_Type(Client) == CLIENT_GOTPASS)
393 return IRC_WriteStrClient(Client,
394 ERR_NEEDMOREPARAMS_MSG,
400 ptr = Client_User(Client);
401 if (!ptr || !*ptr || *ptr == '~')
402 Client_SetUser(Client, Req->argv[0], false);
404 Client_SetUser(Client, Req->argv[0], false);
407 /* "Real name" or user info text: Don't set it to the empty
408 * string, the original ircd can't deal with such "real names"
409 * (e. g. "USER user * * :") ... */
411 Client_SetInfo(Client, Req->argv[3]);
413 Client_SetInfo(Client, "-");
415 LogDebug("Connection %d: got valid USER command ...",
416 Client_Conn(Client));
417 if (Client_Type(Client) == CLIENT_GOTNICK)
418 return Hello_User(Client);
420 Client_SetType(Client, CLIENT_GOTUSER);
423 } else if (Client_Type(Client) == CLIENT_SERVER ||
424 Client_Type(Client) == CLIENT_SERVICE) {
425 /* Server/service updating an user */
427 return IRC_WriteStrClient(Client,
428 ERR_NEEDMOREPARAMS_MSG,
431 c = Client_Search(Req->prefix);
433 return IRC_WriteStrClient(Client, ERR_NOSUCHNICK_MSG,
437 Client_SetUser(c, Req->argv[0], true);
438 Client_SetHostname(c, Req->argv[1]);
439 Client_SetInfo(c, Req->argv[3]);
441 LogDebug("Connection %d: got valid USER command for \"%s\".",
442 Client_Conn(Client), Client_Mask(c));
444 /* RFC 1459 style user registration?
445 * Introduce client to network: */
446 if (Client_Type(c) == CLIENT_GOTNICK)
447 Introduce_Client(Client, c, CLIENT_USER);
450 } else if (Client_Type(Client) == CLIENT_USER) {
451 /* Already registered connection */
452 return IRC_WriteStrClient(Client, ERR_ALREADYREGISTRED_MSG,
455 /* Unexpected/invalid connection state? */
456 return IRC_WriteStrClient(Client, ERR_NOTREGISTERED_MSG,
463 * Handler for the IRC command "SERVICE".
464 * This function implements IRC Services registration using the SERVICE command
465 * defined in RFC 2812 3.1.6 and RFC 2813 4.1.4.
466 * At the moment ngIRCd doesn't support directly linked services, so this
467 * function returns ERR_ERRONEUSNICKNAME when the SERVICE command has not been
468 * received from a peer server.
471 IRC_SERVICE(CLIENT *Client, REQUEST *Req)
474 char *nick, *user, *host, *info, *modes, *ptr;
477 assert(Client != NULL);
480 if (Client_Type(Client) != CLIENT_GOTPASS &&
481 Client_Type(Client) != CLIENT_SERVER)
482 return IRC_WriteStrClient(Client, ERR_ALREADYREGISTRED_MSG,
486 return IRC_WriteStrClient(Client, ERR_NEEDMOREPARAMS_MSG,
487 Client_ID(Client), Req->command);
489 if (Client_Type(Client) != CLIENT_SERVER)
490 return IRC_WriteStrClient(Client, ERR_ERRONEUSNICKNAME_MSG,
491 Client_ID(Client), Req->argv[0]);
493 /* Bad number of parameters? */
495 return IRC_WriteStrClient(Client, ERR_NEEDMOREPARAMS_MSG,
496 Client_ID(Client), Req->command);
499 user = NULL; host = NULL;
500 token = atoi(Req->argv[1]);
501 hops = atoi(Req->argv[4]);
504 /* Validate service name ("nick name") */
505 c = Client_Search(nick);
507 /* Nick name collission: disconnect (KILL) both clients! */
508 Log(LOG_ERR, "Server %s introduces already registered service \"%s\"!",
509 Client_ID(Client), nick);
510 Kill_Nick(nick, "Nick collision");
514 /* Get the server to which the service is connected */
515 intr_c = Client_GetFromToken(Client, token);
517 Log(LOG_ERR, "Server %s introduces service \"%s\" on unknown server!?",
518 Client_ID(Client), nick);
519 Kill_Nick(nick, "Unknown server");
523 /* Get user and host name */
524 ptr = strchr(nick, '@');
530 host = Client_Hostname(intr_c);
531 ptr = strchr(nick, '!');
539 /* According to RFC 2812/2813 parameter 4 <type> "is currently reserved
540 * for future usage"; but we use it to transfer the modes and check
541 * that the first character is a '+' sign and ignore it otherwise. */
542 modes = (Req->argv[3][0] == '+') ? ++Req->argv[3] : "";
544 c = Client_NewRemoteUser(intr_c, nick, hops, user, host,
545 token, modes, info, true);
547 /* Couldn't create client structure, so KILL the service to
548 * keep network status consistent ... */
549 Log(LOG_ALERT, "Can't create client structure! (on connection %d)",
550 Client_Conn(Client));
551 Kill_Nick(nick, "Server error");
555 Introduce_Client(Client, c, CLIENT_SERVICE);
561 IRC_QUIT( CLIENT *Client, REQUEST *Req )
564 char quitmsg[LINE_LEN];
566 assert( Client != NULL );
567 assert( Req != NULL );
569 /* Wrong number of arguments? */
571 return IRC_WriteStrClient( Client, ERR_NEEDMOREPARAMS_MSG, Client_ID( Client ), Req->command );
574 strlcpy(quitmsg, Req->argv[0], sizeof quitmsg);
576 if ( Client_Type( Client ) == CLIENT_SERVER )
579 target = Client_Search( Req->prefix );
582 Log( LOG_WARNING, "Got QUIT from %s for unknown client!?", Client_ID( Client ));
586 Client_Destroy( target, "Got QUIT command.", Req->argc == 1 ? quitmsg : NULL, true);
592 if (Req->argc == 1 && quitmsg[0] != '\"') {
593 /* " " to avoid confusion */
594 strlcpy(quitmsg, "\"", sizeof quitmsg);
595 strlcat(quitmsg, Req->argv[0], sizeof quitmsg-1);
596 strlcat(quitmsg, "\"", sizeof quitmsg );
599 /* User, Service, or not yet registered */
600 Conn_Close( Client_Conn( Client ), "Got QUIT command.", Req->argc == 1 ? quitmsg : NULL, true);
608 IRC_PING(CLIENT *Client, REQUEST *Req)
610 CLIENT *target, *from;
612 assert(Client != NULL);
616 return IRC_WriteStrClient(Client, ERR_NOORIGIN_MSG,
619 /* Don't ignore additional arguments when in "strict" mode */
621 return IRC_WriteStrClient(Client, ERR_NEEDMOREPARAMS_MSG,
622 Client_ID(Client), Req->command);
626 /* A target has been specified ... */
627 target = Client_Search(Req->argv[1]);
629 if (!target || Client_Type(target) != CLIENT_SERVER)
630 return IRC_WriteStrClient(Client, ERR_NOSUCHSERVER_MSG,
631 Client_ID(Client), Req->argv[1]);
633 if (target != Client_ThisServer()) {
634 /* Ok, we have to forward the PING */
635 if (Client_Type(Client) == CLIENT_SERVER)
636 from = Client_Search(Req->prefix);
640 return IRC_WriteStrClient(Client,
641 ERR_NOSUCHSERVER_MSG,
642 Client_ID(Client), Req->prefix);
644 return IRC_WriteStrClientPrefix(target, from,
645 "PING %s :%s", Req->argv[0],
650 if (Client_Type(Client) == CLIENT_SERVER) {
652 from = Client_Search(Req->prefix);
656 from = Client_ThisServer();
658 return IRC_WriteStrClient(Client, ERR_NOSUCHSERVER_MSG,
659 Client_ID(Client), Req->prefix);
661 Log(LOG_DEBUG, "Connection %d: got PING, sending PONG ...",
662 Client_Conn(Client));
665 return IRC_WriteStrClient(Client, "PONG %s :%s",
666 Client_ID(from), Client_ID(Client));
668 /* Some clients depend on the argument being returned in the PONG
669 * reply (not mentioned in any RFC, though) */
670 return IRC_WriteStrClient(Client, "PONG %s :%s",
671 Client_ID(from), Req->argv[0]);
677 IRC_PONG(CLIENT *Client, REQUEST *Req)
679 CLIENT *target, *from;
682 assert(Client != NULL);
685 /* Wrong number of arguments? */
687 return IRC_WriteStrClient(Client, ERR_NOORIGIN_MSG,
690 return IRC_WriteStrClient(Client, ERR_NEEDMOREPARAMS_MSG,
691 Client_ID(Client), Req->command);
694 if (Req->argc == 2 && Client_Type(Client) == CLIENT_SERVER) {
695 target = Client_Search(Req->argv[0]);
697 return IRC_WriteStrClient(Client, ERR_NOSUCHSERVER_MSG,
698 Client_ID(Client), Req->argv[0]);
700 from = Client_Search(Req->prefix);
702 if (target != Client_ThisServer() && target != from) {
703 /* Ok, we have to forward the message. */
705 return IRC_WriteStrClient(Client,
706 ERR_NOSUCHSERVER_MSG,
707 Client_ID(Client), Req->prefix);
709 if (Client_Type(Client_NextHop(target)) != CLIENT_SERVER)
713 return IRC_WriteStrClientPrefix(target, from,
714 "PONG %s :%s", s, Req->argv[1]);
718 /* The connection timestamp has already been updated when the data has
719 * been read from so socket, so we don't need to update it here. */
721 if (Client_Conn(Client) > NONE)
723 "Connection %d: received PONG. Lag: %ld seconds.",
725 time(NULL) - Conn_LastPing(Client_Conn(Client)));
728 "Connection %d: received PONG.", Client_Conn(Client));
735 Hello_User(CLIENT * Client)
737 assert(Client != NULL);
739 /* Check password ... */
740 if (strcmp(Client_Password(Client), Conf_ServerPwd) != 0) {
743 "Client \"%s\" rejected (connection %d): Bad password!",
744 Client_Mask(Client), Client_Conn(Client));
745 Conn_Close(Client_Conn(Client), NULL, "Bad password", true);
749 Introduce_Client(NULL, Client, CLIENT_USER);
751 if (!IRC_WriteStrClient
752 (Client, RPL_WELCOME_MSG, Client_ID(Client), Client_Mask(Client)))
754 if (!IRC_WriteStrClient
755 (Client, RPL_YOURHOST_MSG, Client_ID(Client),
756 Client_ID(Client_ThisServer()), PACKAGE_VERSION, TARGET_CPU,
757 TARGET_VENDOR, TARGET_OS))
759 if (!IRC_WriteStrClient
760 (Client, RPL_CREATED_MSG, Client_ID(Client), NGIRCd_StartStr))
762 if (!IRC_WriteStrClient
763 (Client, RPL_MYINFO_MSG, Client_ID(Client),
764 Client_ID(Client_ThisServer()), PACKAGE_VERSION, USERMODES,
768 /* Features supported by this server (005 numeric, ISUPPORT),
769 * see <http://www.irc.org/tech_docs/005.html> for details. */
770 if (!IRC_Send_ISUPPORT(Client))
773 if (!IRC_Send_LUSERS(Client))
775 if (!IRC_Show_MOTD(Client))
778 /* Suspend the client for a second ... */
779 IRC_SetPenalty(Client, 1);
786 Kill_Nick( char *Nick, char *Reason )
790 assert( Nick != NULL );
791 assert( Reason != NULL );
793 r.prefix = (char *)Client_ThisServer( );
798 Log( LOG_ERR, "User(s) with nick \"%s\" will be disconnected: %s", Nick, Reason );
799 IRC_KILL( Client_ThisServer( ), &r );
804 Introduce_Client(CLIENT *From, CLIENT *Client, int Type)
806 /* Set client type (user or service) */
807 Client_SetType(Client, Type);
810 if (Conf_IsService(Conf_GetServer(Client_Conn(From)),
812 Client_SetType(Client, CLIENT_SERVICE);
813 LogDebug("%s \"%s\" (+%s) registered (via %s, on %s, %d hop%s).",
814 Client_TypeText(Client), Client_Mask(Client),
815 Client_Modes(Client), Client_ID(From),
816 Client_ID(Client_Introducer(Client)),
817 Client_Hops(Client), Client_Hops(Client) > 1 ? "s": "");
819 Log(LOG_NOTICE, "%s \"%s\" registered (connection %d).",
820 Client_TypeText(Client), Client_Mask(Client),
821 Client_Conn(Client));
823 /* Inform other servers */
824 IRC_WriteStrServersPrefixFlag_CB(From,
825 From != NULL ? From : Client_ThisServer(),
826 '\0', cb_introduceClient, (void *)Client);
827 } /* Introduce_Client */
831 cb_introduceClient(CLIENT *To, CLIENT *Prefix, void *data)
833 CLIENT *c = (CLIENT *)data;
835 char *modes, *user, *host;
837 modes = Client_Modes(c);
838 user = Client_User(c) ? Client_User(c) : "-";
839 host = Client_Hostname(c) ? Client_Hostname(c) : "-";
841 conn = Client_Conn(To);
842 if (Conn_Options(conn) & CONN_RFC1459) {
843 /* RFC 1459 mode: separate NICK and USER commands */
844 Conn_WriteStr(conn, "NICK %s :%d", Client_ID(c),
846 Conn_WriteStr(conn, ":%s USER %s %s %s :%s",
847 Client_ID(c), user, host,
848 Client_ID(Client_Introducer(c)), Client_Info(c));
850 Conn_WriteStr(conn, ":%s MODE %s +%s",
851 Client_ID(c), Client_ID(c), modes);
853 /* RFC 2813 mode: one combined NICK or SERVICE command */
854 if (Client_Type(c) == CLIENT_SERVICE
855 && strchr(Client_Flags(To), 'S'))
856 IRC_WriteStrClientPrefix(To, Prefix,
857 "SERVICE %s %d * +%s %d :%s",
859 Client_MyToken(Client_Introducer(c)),
860 Client_Modes(c), Client_Hops(c) + 1,
863 IRC_WriteStrClientPrefix(To, Prefix,
864 "NICK %s %d %s %s %d +%s :%s",
865 Client_ID(c), Client_Hops(c) + 1,
867 Client_MyToken(Client_Introducer(c)),
868 modes, Client_Info(c));
870 } /* cb_introduceClient */