]> arthur.barton.de Git - ngircd-alex.git/blob - src/ngircd/irc-channel.c
138a94ab2883f4fb875cc186762c37309d84e51f
[ngircd-alex.git] / src / ngircd / irc-channel.c
1 /*
2  * ngIRCd -- The Next Generation IRC Daemon
3  * Copyright (c)2001-2010 Alexander Barton (alex@barton.de)
4  *
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.
10  *
11  * IRC channel commands
12  */
13
14
15 #include "portab.h"
16
17 #include "imp.h"
18 #include <assert.h>
19 #include <stdlib.h>
20 #include <stdio.h>
21 #include <string.h>
22
23 #include "defines.h"
24 #include "conn.h"
25 #include "client.h"
26 #include "channel.h"
27 #include "conn-func.h"
28 #include "lists.h"
29 #include "log.h"
30 #include "match.h"
31 #include "messages.h"
32 #include "parse.h"
33 #include "irc-info.h"
34 #include "irc-write.h"
35 #include "conf.h"
36
37 #include "exp.h"
38 #include "irc-channel.h"
39
40
41 /*
42  * RFC 2812, (3.2.1 Join message Command):
43  *  Note that this message
44  *  accepts a special argument ("0"), which is a special request to leave all
45  *  channels the user is currently a member of. The server will process this
46  *  message as if the user had sent a PART command (See Section 3.2.2) for
47  *  each channel he is a member of.
48  */
49 static bool
50 part_from_all_channels(CLIENT* client, CLIENT *target)
51 {
52         CL2CHAN *cl2chan;
53         CHANNEL *chan;
54
55         while ((cl2chan = Channel_FirstChannelOf(target))) {
56                 chan = Channel_GetChannel(cl2chan);
57                 assert( chan != NULL );
58                 Channel_Part(target, client, Channel_Name(chan), Client_ID(target));
59         }
60         return CONNECTED;
61 }
62
63
64 /**
65  * Check weather a local client is allowed to join an already existing
66  * channel or not.
67  * @param Client Client that sent the JOIN command
68  * @param chan Channel to check
69  * @param channame Name of the channel
70  * @param key Provided channel key (or NULL if none has been provided)
71  * @return true if client is allowed to join channel, false otherwise
72  */
73 static bool
74 join_allowed(CLIENT *Client, CHANNEL *chan, const char *channame,
75              const char *key)
76 {
77         bool is_invited, is_banned;
78         const char *channel_modes;
79
80         /* Allow IRC operators to overwrite channel limits */
81         if (strchr(Client_Modes(Client), 'o'))
82                 return true;
83
84         is_banned = Lists_Check(Channel_GetListBans(chan), Client);
85         is_invited = Lists_Check(Channel_GetListInvites(chan), Client);
86
87         if (is_banned && !is_invited) {
88                 /* Client is banned from channel (and not on invite list) */
89                 IRC_WriteStrClient(Client, ERR_BANNEDFROMCHAN_MSG,
90                                    Client_ID(Client), channame);
91                 return false;
92         }
93
94         channel_modes = Channel_Modes(chan);
95         if (strchr(channel_modes, 'i') && !is_invited) {
96                 /* Channel is "invite-only" and client is not on invite list */
97                 IRC_WriteStrClient(Client, ERR_INVITEONLYCHAN_MSG,
98                                    Client_ID(Client), channame);
99                 return false;
100         }
101
102         if (!Channel_CheckKey(chan, Client, key ? key : "")) {
103                 /* Channel is protected by a channel key and the client
104                  * didn't specify the correct one */
105                 IRC_WriteStrClient(Client, ERR_BADCHANNELKEY_MSG,
106                                    Client_ID(Client), channame);
107                 return false;
108         }
109
110         if (strchr(channel_modes, 'l') &&
111             (Channel_MaxUsers(chan) <= Channel_MemberCount(chan))) {
112                 /* There are more clints joined to this channel than allowed */
113                 IRC_WriteStrClient(Client, ERR_CHANNELISFULL_MSG,
114                                    Client_ID(Client), channame);
115                 return false;
116         }
117
118         if (strchr(channel_modes, 'z') && !Conn_UsesSSL(Client_Conn(Client))) {
119                 /* Only "secure" clients are allowed, but clients doesn't
120                  * use SSL encryption */
121                 IRC_WriteStrClient(Client, ERR_SECURECHANNEL_MSG,
122                                    Client_ID(Client), channame);
123                 return false;
124         }
125
126         return true;
127 }
128
129
130 static void
131 join_set_channelmodes(CHANNEL *chan, CLIENT *target, const char *flags)
132 {
133         if (flags) {
134                 while (*flags) {
135                         Channel_UserModeAdd(chan, target, *flags);
136                         flags++;
137                 }
138         }
139
140         /* If channel persistent and client is ircop: make client chanop */
141         if (strchr(Channel_Modes(chan), 'P') && strchr(Client_Modes(target), 'o'))
142                 Channel_UserModeAdd(chan, target, 'o');
143 }
144
145
146 static void
147 cb_join_forward(CLIENT *To, CLIENT *Prefix, void *Data)
148 {
149         CONN_ID conn;
150         char str[COMMAND_LEN], *ptr = NULL;
151
152         strlcpy(str, (char *)Data, sizeof(str));
153         conn = Client_Conn(To);
154
155         if (Conn_Options(conn) & CONN_RFC1459) {
156                 /* RFC 1459 compatibility mode, appended modes are NOT
157                  * supported, so strip them off! */
158                 ptr = strchr(str, 0x7);
159                 if (ptr)
160                         *ptr++ = '\0';
161         }
162
163         IRC_WriteStrClientPrefix(To, Prefix, "JOIN %s", str);
164         if (ptr && *ptr)
165                 IRC_WriteStrClientPrefix(To, Prefix, "MODE %s +%s %s", str, ptr,
166                                          Client_ID(Prefix));
167 } /* cb_join_forward */
168
169
170 static void
171 join_forward(CLIENT *Client, CLIENT *target, CHANNEL *chan,
172                                         const char *channame)
173 {
174         char modes[CHANNEL_MODE_LEN], str[COMMAND_LEN];
175
176         strlcpy(&modes[1], Channel_UserModes(chan, target), sizeof(modes) - 1);
177         if (modes[1])
178                 modes[0] = 0x7;
179         else
180                 modes[0] = '\0';
181
182         /* forward to other servers (if it is not a local channel) */
183         if (!Channel_IsLocal(chan)) {
184                 snprintf(str, sizeof(str), "%s%s", channame, modes);
185                 IRC_WriteStrServersPrefixFlag_CB(Client, target, '\0',
186                                                  cb_join_forward, str);
187         }
188
189         /* tell users in this channel about the new client */
190         IRC_WriteStrChannelPrefix(Client, chan, target, false,
191                                   "JOIN :%s",  channame);
192
193         /* syncronize channel modes */
194         if (modes[1]) {
195                 IRC_WriteStrChannelPrefix(Client, chan, target, false,
196                                           "MODE %s +%s %s", channame,
197                                           &modes[1], Client_ID(target));
198         }
199 } /* join_forward */
200
201
202 static bool
203 join_send_topic(CLIENT *Client, CLIENT *target, CHANNEL *chan,
204                                         const char *channame)
205 {
206         const char *topic;
207
208         if (Client_Type(Client) != CLIENT_USER)
209                 return true;
210         /* acknowledge join */
211         if (!IRC_WriteStrClientPrefix(Client, target, "JOIN :%s", channame))
212                 return false;
213
214         /* Send topic to client, if any */
215         topic = Channel_Topic(chan);
216         assert(topic != NULL);
217         if (*topic) {
218                 if (!IRC_WriteStrClient(Client, RPL_TOPIC_MSG,
219                         Client_ID(Client), channame, topic))
220                                 return false;
221 #ifndef STRICT_RFC
222                 if (!IRC_WriteStrClient(Client, RPL_TOPICSETBY_MSG,
223                         Client_ID(Client), channame,
224                         Channel_TopicWho(chan),
225                         Channel_TopicTime(chan)))
226                                 return false;
227 #endif
228         }
229         /* send list of channel members to client */
230         if (!IRC_Send_NAMES(Client, chan))
231                 return false;
232         return IRC_WriteStrClient(Client, RPL_ENDOFNAMES_MSG, Client_ID(Client), Channel_Name(chan));
233 }
234
235
236 GLOBAL bool
237 IRC_JOIN( CLIENT *Client, REQUEST *Req )
238 {
239         char *channame, *key = NULL, *flags, *lastkey = NULL, *lastchan = NULL;
240         CLIENT *target;
241         CHANNEL *chan;
242
243         assert( Client != NULL );
244         assert( Req != NULL );
245
246         /* Bad number of arguments? */
247         if (Req->argc < 1 || Req->argc > 2)
248                 return IRC_WriteStrClient(Client, ERR_NEEDMOREPARAMS_MSG,
249                                           Client_ID(Client), Req->command);
250
251         /* Who is the sender? */
252         if (Client_Type(Client) == CLIENT_SERVER)
253                 target = Client_Search(Req->prefix);
254         else
255                 target = Client;
256
257         if (!target)
258                 return IRC_WriteStrClient(Client, ERR_NOSUCHNICK_MSG, Client_ID(Client), Req->prefix);
259
260         /* Is argument "0"? */
261         if (Req->argc == 1 && !strncmp("0", Req->argv[0], 2))
262                 return part_from_all_channels(Client, target);
263
264         /* Are channel keys given? */
265         if (Req->argc > 1)
266                 key = strtok_r(Req->argv[1], ",", &lastkey);
267
268         channame = Req->argv[0];
269         channame = strtok_r(channame, ",", &lastchan);
270
271         /* Make sure that "channame" is not the empty string ("JOIN :") */
272         if (! channame)
273                 return IRC_WriteStrClient(Client, ERR_NEEDMOREPARAMS_MSG,
274                                           Client_ID(Client), Req->command);
275
276         while (channame) {
277                 flags = NULL;
278
279                 /* Did the server include channel-user-modes? */
280                 if (Client_Type(Client) == CLIENT_SERVER) {
281                         flags = strchr(channame, 0x7);
282                         if (flags) {
283                                 *flags = '\0';
284                                 flags++;
285                         }
286                 }
287
288                 chan = Channel_Search(channame);
289                 if (!chan && Conf_PredefChannelsOnly) {
290                          /* channel must be created, but server does not allow this */
291                         IRC_WriteStrClient(Client, ERR_BANNEDFROMCHAN_MSG, Client_ID(Client), channame);
292                         break;
293                 }
294
295                 /* Local client? */
296                 if (Client_Type(Client) == CLIENT_USER) {
297                         /* Test if the user has reached the channel limit */
298                         if ((Conf_MaxJoins > 0) &&
299                             (Channel_CountForUser(Client) >= Conf_MaxJoins))
300                                 return IRC_WriteStrClient(Client,
301                                                 ERR_TOOMANYCHANNELS_MSG,
302                                                 Client_ID(Client), channame);
303                         if (chan) {
304                                 /* Already existing channel: check if the
305                                  * client is allowed to join */
306                                 if (!join_allowed(Client, chan, channame, key))
307                                         break;
308                         } else {
309                                 /* New channel: first user will become channel
310                                  * operator unless this is a modeless channel */
311                                 if (*channame != '+')
312                                         flags = "o";
313                         }
314
315                         /* Local client: update idle time */
316                         Conn_UpdateIdle(Client_Conn(Client));
317                 } else {
318                         /* Remote server: we don't need to know whether the
319                          * client is invited or not, but we have to make sure
320                          * that the "one shot" entries (generated by INVITE
321                          * commands) in this list become deleted when a user
322                          * joins a channel this way. */
323                         if (chan)
324                                 (void)Lists_Check(Channel_GetListInvites(chan),
325                                                   target);
326                 }
327
328                 /* Join channel (and create channel if it doesn't exist) */
329                 if (!Channel_Join(target, channame))
330                         break;
331
332                 if (!chan) { /* channel is new; it has been created above */
333                         chan = Channel_Search(channame);
334                         assert(chan != NULL);
335                         if (Channel_IsModeless(chan)) {
336                                 Channel_ModeAdd(chan, 't'); /* /TOPIC not allowed */
337                                 Channel_ModeAdd(chan, 'n'); /* no external msgs */
338                         }
339                 }
340                 assert(chan != NULL);
341
342                 join_set_channelmodes(chan, target, flags);
343
344                 join_forward(Client, target, chan, channame);
345
346                 if (!join_send_topic(Client, target, chan, channame))
347                         break; /* write error */
348
349                 /* next channel? */
350                 channame = strtok_r(NULL, ",", &lastchan);
351                 if (channame && key)
352                         key = strtok_r(NULL, ",", &lastkey);
353         }
354         return CONNECTED;
355 } /* IRC_JOIN */
356
357
358 /**
359  * Handler for the IRC "PART" command.
360  */
361 GLOBAL bool
362 IRC_PART(CLIENT * Client, REQUEST * Req)
363 {
364         CLIENT *target;
365         char *chan;
366
367         assert(Client != NULL);
368         assert(Req != NULL);
369
370         if (Req->argc < 1 || Req->argc > 2)
371                 return IRC_WriteStrClient(Client, ERR_NEEDMOREPARAMS_MSG,
372                                           Client_ID(Client), Req->command);
373
374         /* Get the sender */
375         if (Client_Type(Client) == CLIENT_SERVER)
376                 target = Client_Search(Req->prefix);
377         else
378                 target = Client;
379         if (!target)
380                 return IRC_WriteStrClient(Client, ERR_NOSUCHNICK_MSG,
381                                           Client_ID(Client), Req->prefix);
382
383         /* Loop over all the given channel names */
384         chan = strtok(Req->argv[0], ",");
385
386         /* Make sure that "chan" is not the empty string ("PART :") */
387         if (! chan)
388                 return IRC_WriteStrClient(Client, ERR_NEEDMOREPARAMS_MSG,
389                                           Client_ID(Client), Req->command);
390
391         while (chan) {
392                 Channel_Part(target, Client, chan,
393                              Req->argc > 1 ? Req->argv[1] : Client_ID(target));
394                 chan = strtok(NULL, ",");
395         }
396
397         /* Update idle time, if local client */
398         if (Client_Conn(Client) > NONE)
399                 Conn_UpdateIdle(Client_Conn(Client));
400
401         return CONNECTED;
402 } /* IRC_PART */
403
404
405 GLOBAL bool
406 IRC_TOPIC( CLIENT *Client, REQUEST *Req )
407 {
408         CHANNEL *chan;
409         CLIENT *from;
410         char *topic;
411         bool r;
412
413         assert( Client != NULL );
414         assert( Req != NULL );
415
416         if ((Req->argc < 1) || (Req->argc > 2))
417                 return IRC_WriteStrClient(Client, ERR_NEEDMOREPARAMS_MSG, Client_ID(Client), Req->command);
418
419         if( Client_Type( Client ) == CLIENT_SERVER ) from = Client_Search( Req->prefix );
420         else from = Client;
421         if( ! from ) return IRC_WriteStrClient( Client, ERR_NOSUCHNICK_MSG, Client_ID( Client ), Req->prefix );
422
423         /* Welcher Channel? */
424         chan = Channel_Search( Req->argv[0] );
425         if( ! chan ) return IRC_WriteStrClient( from, ERR_NOSUCHCHANNEL_MSG, Client_ID( from ), Req->argv[0] );
426
427         /* Ist der User Mitglied in dem Channel? */
428         if( ! Channel_IsMemberOf( chan, from )) return IRC_WriteStrClient( from, ERR_NOTONCHANNEL_MSG, Client_ID( from ), Req->argv[0] );
429
430         if( Req->argc == 1 )
431         {
432                 /* Request actual topic */
433                 topic = Channel_Topic(chan);
434                 if (*topic) {
435                         r = IRC_WriteStrClient(from, RPL_TOPIC_MSG,
436                                 Client_ID(Client), Channel_Name(chan), topic);
437 #ifndef STRICT_RFC
438                         r = IRC_WriteStrClient(from, RPL_TOPICSETBY_MSG,
439                                 Client_ID(Client), Channel_Name(chan),
440                                 Channel_TopicWho(chan),
441                                 Channel_TopicTime(chan));
442 #endif
443                         return r;
444                 }
445                 else
446                          return IRC_WriteStrClient(from, RPL_NOTOPIC_MSG,
447                                         Client_ID(from), Channel_Name(chan));
448         }
449
450         if( strchr( Channel_Modes( chan ), 't' ))
451         {
452                 /* Topic Lock. Ist der User ein Channel Operator? */
453                 if( ! strchr( Channel_UserModes( chan, from ), 'o' )) return IRC_WriteStrClient( from, ERR_CHANOPRIVSNEEDED_MSG, Client_ID( from ), Channel_Name( chan ));
454         }
455
456         /* Set new topic */
457         Channel_SetTopic(chan, from, Req->argv[1]);
458         LogDebug("%s \"%s\" set topic on \"%s\": %s",
459                  Client_TypeText(from), Client_Mask(from), Channel_Name(chan),
460                  Req->argv[1][0] ? Req->argv[1] : "<none>");
461
462         /* Update channel and forward new topic to other servers */
463         if (!Channel_IsLocal(chan))
464                 IRC_WriteStrServersPrefix(Client, from, "TOPIC %s :%s",
465                                           Req->argv[0], Req->argv[1]);
466         IRC_WriteStrChannelPrefix(Client, chan, from, false, "TOPIC %s :%s",
467                                   Req->argv[0], Req->argv[1]);
468
469         if (Client_Type(Client) == CLIENT_USER)
470                 return IRC_WriteStrClientPrefix(Client, Client, "TOPIC %s :%s",
471                                                 Req->argv[0], Req->argv[1]);
472         else
473                 return CONNECTED;
474 } /* IRC_TOPIC */
475
476
477 /**
478  * Handler for the IRC "LIST" command.
479  * This implementation handles the local case as well as the forwarding of the
480  * LIST command to other servers in the IRC network.
481  */
482 GLOBAL bool
483 IRC_LIST( CLIENT *Client, REQUEST *Req )
484 {
485         char *pattern;
486         CHANNEL *chan;
487         CLIENT *from, *target;
488
489         assert( Client != NULL );
490         assert( Req != NULL );
491
492         /* Bad number of prameters? */
493         if( Req->argc > 2 )
494                 return IRC_WriteStrClient( Client, ERR_NEEDMOREPARAMS_MSG,
495                         Client_ID( Client ), Req->command );
496
497         if( Req->argc > 0 )
498                 pattern = strtok( Req->argv[0], "," );
499         else
500                 pattern = "*";
501
502         /* Get sender from prefix, if any */
503         if( Client_Type( Client ) == CLIENT_SERVER )
504                 from = Client_Search( Req->prefix );
505         else
506                 from = Client;
507
508         if( ! from )
509                 return IRC_WriteStrClient( Client, ERR_NOSUCHSERVER_MSG,
510                                 Client_ID( Client ), Req->prefix );
511
512         if( Req->argc == 2 )
513         {
514                 /* Forward to other server? */
515                 target = Client_Search( Req->argv[1] );
516                 if(( ! target ) || ( Client_Type( target ) != CLIENT_SERVER ))
517                         return IRC_WriteStrClient( from, ERR_NOSUCHSERVER_MSG,
518                                         Client_ID( Client ), Req->argv[1] );
519
520                 if( target != Client_ThisServer( ))
521                 {
522                         /* Target is indeed an other server, forward it! */
523                         return IRC_WriteStrClientPrefix( target, from,
524                                         "LIST %s :%s", Client_ID( from ),
525                                         Req->argv[1] );
526                 }
527         }
528
529         while( pattern )
530         {
531                 /* Loop through all the channels */
532                 chan = Channel_First( );
533                 while( chan )
534                 {
535                         /* Check search pattern */
536                         if( Match( pattern, Channel_Name( chan )))
537                         {
538                                 /* Gotcha! */
539                                 if( ! strchr( Channel_Modes( chan ), 's' ) ||
540                                     Channel_IsMemberOf( chan, from ))
541                                 {
542                                         if( ! IRC_WriteStrClient( from,
543                                             RPL_LIST_MSG, Client_ID( from ),
544                                             Channel_Name( chan ),
545                                             Channel_MemberCount( chan ),
546                                             Channel_Topic( chan )))
547                                                 return DISCONNECTED;
548                                 }
549                         }
550                         chan = Channel_Next( chan );
551                 }
552
553                 /* Get next name ... */
554                 if( Req->argc > 0 )
555                         pattern = strtok( NULL, "," );
556                 else
557                         pattern = NULL;
558         }
559
560         return IRC_WriteStrClient( from, RPL_LISTEND_MSG, Client_ID( from ));
561 } /* IRC_LIST */
562
563
564 GLOBAL bool
565 IRC_CHANINFO( CLIENT *Client, REQUEST *Req )
566 {
567         char modes_add[COMMAND_LEN], l[16], *ptr;
568         CLIENT *from;
569         CHANNEL *chan;
570         int arg_topic;
571
572         assert( Client != NULL );
573         assert( Req != NULL );
574
575         /* Bad number of parameters? */
576         if(( Req->argc < 2 ) || ( Req->argc == 4 ) || ( Req->argc > 5 )) return IRC_WriteStrClient( Client, ERR_NEEDMOREPARAMS_MSG, Client_ID( Client ), Req->command );
577
578         /* Compatibility kludge */
579         if( Req->argc == 5 ) arg_topic = 4;
580         else if( Req->argc == 3 ) arg_topic = 2;
581         else arg_topic = -1;
582
583         /* Search origin */
584         from = Client_Search( Req->prefix );
585         if( ! from ) return IRC_WriteStrClient( Client, ERR_NOSUCHNICK_MSG, Client_ID( Client ), Req->prefix );
586
587         /* Search or create channel */
588         chan = Channel_Search( Req->argv[0] );
589         if( ! chan ) chan = Channel_Create( Req->argv[0] );
590         if( ! chan ) return CONNECTED;
591
592         if( Req->argv[1][0] == '+' )
593         {
594                 ptr = Channel_Modes( chan );
595                 if( ! *ptr )
596                 {
597                         /* OK, this channel doesn't have modes jet, set the received ones: */
598                         Channel_SetModes( chan, &Req->argv[1][1] );
599
600                         if( Req->argc == 5 )
601                         {
602                                 if( strchr( Channel_Modes( chan ), 'k' )) Channel_SetKey( chan, Req->argv[2] );
603                                 if( strchr( Channel_Modes( chan ), 'l' )) Channel_SetMaxUsers( chan, atol( Req->argv[3] ));
604                         }
605                         else
606                         {
607                                 /* Delete modes which we never want to inherit */
608                                 Channel_ModeDel( chan, 'l' );
609                                 Channel_ModeDel( chan, 'k' );
610                         }
611
612                         strcpy( modes_add, "" );
613                         ptr = Channel_Modes( chan );
614                         while( *ptr )
615                         {
616                                 if( *ptr == 'l' )
617                                 {
618                                         snprintf( l, sizeof( l ), " %lu", Channel_MaxUsers( chan ));
619                                         strlcat( modes_add, l, sizeof( modes_add ));
620                                 }
621                                 if( *ptr == 'k' )
622                                 {
623                                         strlcat( modes_add, " ", sizeof( modes_add ));
624                                         strlcat( modes_add, Channel_Key( chan ), sizeof( modes_add ));
625                                 }
626                                 ptr++;
627                         }
628
629                         /* Inform members of this channel */
630                         IRC_WriteStrChannelPrefix( Client, chan, from, false, "MODE %s +%s%s", Req->argv[0], Channel_Modes( chan ), modes_add );
631                 }
632         }
633         else Log( LOG_WARNING, "CHANINFO: invalid MODE format ignored!" );
634
635         if( arg_topic > 0 )
636         {
637                 /* We got a topic */
638                 ptr = Channel_Topic( chan );
639                 if(( ! *ptr ) && ( Req->argv[arg_topic][0] ))
640                 {
641                         /* OK, there is no topic jet */
642                         Channel_SetTopic(chan, Client, Req->argv[arg_topic]);
643                         IRC_WriteStrChannelPrefix(Client, chan, from, false,
644                              "TOPIC %s :%s", Req->argv[0], Channel_Topic(chan));
645                 }
646         }
647
648         /* Forward CHANINFO to other serevrs */
649         if( Req->argc == 5 ) IRC_WriteStrServersPrefixFlag( Client, from, 'C', "CHANINFO %s %s %s %s :%s", Req->argv[0], Req->argv[1], Req->argv[2], Req->argv[3], Req->argv[4] );
650         else if( Req->argc == 3 ) IRC_WriteStrServersPrefixFlag( Client, from, 'C', "CHANINFO %s %s :%s", Req->argv[0], Req->argv[1], Req->argv[2] );
651         else IRC_WriteStrServersPrefixFlag( Client, from, 'C', "CHANINFO %s %s", Req->argv[0], Req->argv[1] );
652
653         return CONNECTED;
654 } /* IRC_CHANINFO */
655
656
657 /* -eof- */