]> arthur.barton.de Git - ngircd-alex.git/blob - src/ngircd/irc-channel.c
New configuration option "NoZeroConf" to disable ZeroConf registration
[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 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, Client_ID(Client), Req->command);
417
418         if( Client_Type( Client ) == CLIENT_SERVER ) from = Client_Search( Req->prefix );
419         else from = Client;
420         if( ! from ) return IRC_WriteStrClient( Client, ERR_NOSUCHNICK_MSG, Client_ID( Client ), Req->prefix );
421
422         /* Welcher Channel? */
423         chan = Channel_Search( Req->argv[0] );
424         if( ! chan ) return IRC_WriteStrClient( from, ERR_NOSUCHCHANNEL_MSG, Client_ID( from ), Req->argv[0] );
425
426         /* Ist der User Mitglied in dem Channel? */
427         if( ! Channel_IsMemberOf( chan, from )) return IRC_WriteStrClient( from, ERR_NOTONCHANNEL_MSG, Client_ID( from ), Req->argv[0] );
428
429         if( Req->argc == 1 )
430         {
431                 /* Request actual topic */
432                 topic = Channel_Topic(chan);
433                 if (*topic) {
434                         r = IRC_WriteStrClient(from, RPL_TOPIC_MSG,
435                                 Client_ID(Client), Channel_Name(chan), topic);
436 #ifndef STRICT_RFC
437                         r = IRC_WriteStrClient(from, RPL_TOPICSETBY_MSG,
438                                 Client_ID(Client), Channel_Name(chan),
439                                 Channel_TopicWho(chan),
440                                 Channel_TopicTime(chan));
441 #endif
442                         return r;
443                 }
444                 else
445                          return IRC_WriteStrClient(from, RPL_NOTOPIC_MSG,
446                                         Client_ID(from), Channel_Name(chan));
447         }
448
449         if( strchr( Channel_Modes( chan ), 't' ))
450         {
451                 /* Topic Lock. Ist der User ein Channel Operator? */
452                 if( ! strchr( Channel_UserModes( chan, from ), 'o' )) return IRC_WriteStrClient( from, ERR_CHANOPRIVSNEEDED_MSG, Client_ID( from ), Channel_Name( chan ));
453         }
454
455         /* Set new topic */
456         Channel_SetTopic(chan, from, Req->argv[1]);
457         LogDebug("%s \"%s\" set topic on \"%s\": %s",
458                  Client_TypeText(from), Client_Mask(from), Channel_Name(chan),
459                  Req->argv[1][0] ? Req->argv[1] : "<none>");
460
461         /* Update channel and forward new topic to other servers */
462         if (!Channel_IsLocal(chan))
463                 IRC_WriteStrServersPrefix(Client, from, "TOPIC %s :%s",
464                                           Req->argv[0], Req->argv[1]);
465         IRC_WriteStrChannelPrefix(Client, chan, from, false, "TOPIC %s :%s",
466                                   Req->argv[0], Req->argv[1]);
467
468         if (Client_Type(Client) == CLIENT_USER)
469                 return IRC_WriteStrClientPrefix(Client, Client, "TOPIC %s :%s",
470                                                 Req->argv[0], Req->argv[1]);
471         else
472                 return CONNECTED;
473 } /* IRC_TOPIC */
474
475
476 /**
477  * Handler for the IRC "LIST" command.
478  * This implementation handles the local case as well as the forwarding of the
479  * LIST command to other servers in the IRC network.
480  */
481 GLOBAL bool
482 IRC_LIST( CLIENT *Client, REQUEST *Req )
483 {
484         char *pattern;
485         CHANNEL *chan;
486         CLIENT *from, *target;
487
488         assert( Client != NULL );
489         assert( Req != NULL );
490
491         /* Bad number of prameters? */
492         if( Req->argc > 2 )
493                 return IRC_WriteStrClient( Client, ERR_NEEDMOREPARAMS_MSG,
494                         Client_ID( Client ), Req->command );
495
496         if( Req->argc > 0 )
497                 pattern = strtok( Req->argv[0], "," );
498         else
499                 pattern = "*";
500
501         /* Get sender from prefix, if any */
502         if( Client_Type( Client ) == CLIENT_SERVER )
503                 from = Client_Search( Req->prefix );
504         else
505                 from = Client;
506
507         if( ! from )
508                 return IRC_WriteStrClient( Client, ERR_NOSUCHSERVER_MSG,
509                                 Client_ID( Client ), Req->prefix );
510
511         if( Req->argc == 2 )
512         {
513                 /* Forward to other server? */
514                 target = Client_Search( Req->argv[1] );
515                 if(( ! target ) || ( Client_Type( target ) != CLIENT_SERVER ))
516                         return IRC_WriteStrClient( from, ERR_NOSUCHSERVER_MSG,
517                                         Client_ID( Client ), Req->argv[1] );
518
519                 if( target != Client_ThisServer( ))
520                 {
521                         /* Target is indeed an other server, forward it! */
522                         return IRC_WriteStrClientPrefix( target, from,
523                                         "LIST %s :%s", Client_ID( from ),
524                                         Req->argv[1] );
525                 }
526         }
527
528         while( pattern )
529         {
530                 /* Loop through all the channels */
531                 chan = Channel_First( );
532                 while( chan )
533                 {
534                         /* Check search pattern */
535                         if( Match( pattern, Channel_Name( chan )))
536                         {
537                                 /* Gotcha! */
538                                 if( ! strchr( Channel_Modes( chan ), 's' ) ||
539                                     Channel_IsMemberOf( chan, from ))
540                                 {
541                                         if( ! IRC_WriteStrClient( from,
542                                             RPL_LIST_MSG, Client_ID( from ),
543                                             Channel_Name( chan ),
544                                             Channel_MemberCount( chan ),
545                                             Channel_Topic( chan )))
546                                                 return DISCONNECTED;
547                                 }
548                         }
549                         chan = Channel_Next( chan );
550                 }
551
552                 /* Get next name ... */
553                 if( Req->argc > 0 )
554                         pattern = strtok( NULL, "," );
555                 else
556                         pattern = NULL;
557         }
558
559         return IRC_WriteStrClient( from, RPL_LISTEND_MSG, Client_ID( from ));
560 } /* IRC_LIST */
561
562
563 GLOBAL bool
564 IRC_CHANINFO( CLIENT *Client, REQUEST *Req )
565 {
566         char modes_add[COMMAND_LEN], l[16], *ptr;
567         CLIENT *from;
568         CHANNEL *chan;
569         int arg_topic;
570
571         assert( Client != NULL );
572         assert( Req != NULL );
573
574         /* Bad number of parameters? */
575         if(( Req->argc < 2 ) || ( Req->argc == 4 ) || ( Req->argc > 5 )) return IRC_WriteStrClient( Client, ERR_NEEDMOREPARAMS_MSG, Client_ID( Client ), Req->command );
576
577         /* Compatibility kludge */
578         if( Req->argc == 5 ) arg_topic = 4;
579         else if( Req->argc == 3 ) arg_topic = 2;
580         else arg_topic = -1;
581
582         /* Search origin */
583         from = Client_Search( Req->prefix );
584         if( ! from ) return IRC_WriteStrClient( Client, ERR_NOSUCHNICK_MSG, Client_ID( Client ), Req->prefix );
585
586         /* Search or create channel */
587         chan = Channel_Search( Req->argv[0] );
588         if( ! chan ) chan = Channel_Create( Req->argv[0] );
589         if( ! chan ) return CONNECTED;
590
591         if( Req->argv[1][0] == '+' )
592         {
593                 ptr = Channel_Modes( chan );
594                 if( ! *ptr )
595                 {
596                         /* OK, this channel doesn't have modes jet, set the received ones: */
597                         Channel_SetModes( chan, &Req->argv[1][1] );
598
599                         if( Req->argc == 5 )
600                         {
601                                 if( strchr( Channel_Modes( chan ), 'k' )) Channel_SetKey( chan, Req->argv[2] );
602                                 if( strchr( Channel_Modes( chan ), 'l' )) Channel_SetMaxUsers( chan, atol( Req->argv[3] ));
603                         }
604                         else
605                         {
606                                 /* Delete modes which we never want to inherit */
607                                 Channel_ModeDel( chan, 'l' );
608                                 Channel_ModeDel( chan, 'k' );
609                         }
610
611                         strcpy( modes_add, "" );
612                         ptr = Channel_Modes( chan );
613                         while( *ptr )
614                         {
615                                 if( *ptr == 'l' )
616                                 {
617                                         snprintf( l, sizeof( l ), " %lu", Channel_MaxUsers( chan ));
618                                         strlcat( modes_add, l, sizeof( modes_add ));
619                                 }
620                                 if( *ptr == 'k' )
621                                 {
622                                         strlcat( modes_add, " ", sizeof( modes_add ));
623                                         strlcat( modes_add, Channel_Key( chan ), sizeof( modes_add ));
624                                 }
625                                 ptr++;
626                         }
627
628                         /* Inform members of this channel */
629                         IRC_WriteStrChannelPrefix( Client, chan, from, false, "MODE %s +%s%s", Req->argv[0], Channel_Modes( chan ), modes_add );
630                 }
631         }
632         else Log( LOG_WARNING, "CHANINFO: invalid MODE format ignored!" );
633
634         if( arg_topic > 0 )
635         {
636                 /* We got a topic */
637                 ptr = Channel_Topic( chan );
638                 if(( ! *ptr ) && ( Req->argv[arg_topic][0] ))
639                 {
640                         /* OK, there is no topic jet */
641                         Channel_SetTopic(chan, Client, Req->argv[arg_topic]);
642                         IRC_WriteStrChannelPrefix(Client, chan, from, false,
643                              "TOPIC %s :%s", Req->argv[0], Channel_Topic(chan));
644                 }
645         }
646
647         /* Forward CHANINFO to other serevrs */
648         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] );
649         else if( Req->argc == 3 ) IRC_WriteStrServersPrefixFlag( Client, from, 'C', "CHANINFO %s %s :%s", Req->argv[0], Req->argv[1], Req->argv[2] );
650         else IRC_WriteStrServersPrefixFlag( Client, from, 'C', "CHANINFO %s %s", Req->argv[0], Req->argv[1] );
651
652         return CONNECTED;
653 } /* IRC_CHANINFO */
654
655
656 /* -eof- */