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