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