ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/ircd-hybrid/branches/8.2.x/src/user.c
Revision: 9578
Committed: Sat Aug 29 12:53:01 2020 UTC (5 years, 10 months ago) by michael
Content type: text/x-csrc
File size: 21698 byte(s)
Log Message:
- user.c:introduce_client(): remove old backwards compatibility code for non rhost servers

File Contents

# Content
1 /*
2 * ircd-hybrid: an advanced, lightweight Internet Relay Chat Daemon (ircd)
3 *
4 * Copyright (c) 1997-2020 ircd-hybrid development team
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
19 * USA
20 */
21
22 /*! \file user.c
23 * \brief User related functions.
24 * \version $Id$
25 */
26
27 #include "stdinc.h"
28 #include "list.h"
29 #include "user.h"
30 #include "channel.h"
31 #include "channel_mode.h"
32 #include "client.h"
33 #include "hash.h"
34 #include "id.h"
35 #include "irc_string.h"
36 #include "ircd.h"
37 #include "listener.h"
38 #include "motd.h"
39 #include "numeric.h"
40 #include "conf.h"
41 #include "conf_gecos.h"
42 #include "log.h"
43 #include "server.h"
44 #include "server_capab.h" /* TBR: RHOST compatibility mode */
45 #include "send.h"
46 #include "memory.h"
47 #include "packet.h"
48 #include "rng_mt.h"
49 #include "misc.h"
50 #include "parse.h"
51 #include "watch.h"
52 #include "isupport.h"
53 #include "tls.h"
54 #include "patchlevel.h"
55
56 static char umode_buffer[UMODE_MAX_STR];
57
58 const struct user_modes *umode_map[256];
59 const struct user_modes umode_tab[] =
60 {
61 { 'D', UMODE_DEAF },
62 { 'F', UMODE_FARCONNECT },
63 { 'G', UMODE_SOFTCALLERID },
64 { 'H', UMODE_HIDDEN },
65 { 'X', UMODE_EXPIRATION },
66 { 'R', UMODE_REGONLY },
67 { 'S', UMODE_SECURE },
68 { 'W', UMODE_WEBIRC },
69 { 'a', UMODE_ADMIN },
70 { 'b', UMODE_BOTS },
71 { 'c', UMODE_CCONN },
72 { 'd', UMODE_DEBUG },
73 { 'e', UMODE_EXTERNAL },
74 { 'f', UMODE_FULL },
75 { 'g', UMODE_CALLERID },
76 { 'i', UMODE_INVISIBLE },
77 { 'j', UMODE_REJ },
78 { 'k', UMODE_SKILL },
79 { 'l', UMODE_LOCOPS },
80 { 'n', UMODE_NCHANGE },
81 { 'o', UMODE_OPER },
82 { 'p', UMODE_HIDECHANS },
83 { 'q', UMODE_HIDEIDLE },
84 { 'r', UMODE_REGISTERED },
85 { 's', UMODE_SERVNOTICE },
86 { 'u', UMODE_UNAUTH },
87 { 'w', UMODE_WALLOP },
88 { 'y', UMODE_SPY },
89 { '\0', 0 }
90 };
91
92 void
93 user_modes_init(void)
94 {
95 char *umode_buffer_ptr = umode_buffer;
96
97 for (const struct user_modes *tab = umode_tab; tab->c; ++tab)
98 {
99 umode_map[tab->c] = tab;
100 *umode_buffer_ptr++ = tab->c;
101 }
102
103 *umode_buffer_ptr = '\0';
104 }
105
106 /* show_lusers()
107 *
108 * inputs - pointer to client
109 * output - NONE
110 * side effects - display to client user counts etc.
111 */
112 void
113 show_lusers(struct Client *client)
114 {
115 if (ConfigServerHide.hide_servers == 0 || HasUMode(client, UMODE_OPER))
116 sendto_one_numeric(client, &me, RPL_LUSERCLIENT, (dlink_list_length(&global_client_list) - Count.invisi),
117 Count.invisi, dlink_list_length(&global_server_list));
118 else
119 sendto_one_numeric(client, &me, RPL_LUSERCLIENT, (dlink_list_length(&global_client_list) - Count.invisi),
120 Count.invisi, 1);
121
122 if (Count.oper)
123 sendto_one_numeric(client, &me, RPL_LUSEROP, Count.oper);
124
125 if (dlink_list_length(&unknown_list))
126 sendto_one_numeric(client, &me, RPL_LUSERUNKNOWN, dlink_list_length(&unknown_list));
127
128 if (dlink_list_length(channel_get_list()))
129 sendto_one_numeric(client, &me, RPL_LUSERCHANNELS, dlink_list_length(channel_get_list()));
130
131 if (ConfigServerHide.hide_servers == 0 || HasUMode(client, UMODE_OPER))
132 {
133 sendto_one_numeric(client, &me, RPL_LUSERME, dlink_list_length(&local_client_list), dlink_list_length(&local_server_list));
134 sendto_one_numeric(client, &me, RPL_LOCALUSERS, dlink_list_length(&local_client_list), Count.max_loc);
135 sendto_one_numeric(client, &me, RPL_GLOBALUSERS, dlink_list_length(&global_client_list), Count.max_tot);
136 sendto_one_numeric(client, &me, RPL_STATSCONN, Count.max_loc_con, Count.max_loc, Count.totalrestartcount);
137 }
138 else
139 {
140 sendto_one_numeric(client, &me, RPL_LUSERME, dlink_list_length(&global_client_list), 0);
141 sendto_one_numeric(client, &me, RPL_LOCALUSERS, dlink_list_length(&global_client_list), Count.max_tot);
142 sendto_one_numeric(client, &me, RPL_GLOBALUSERS, dlink_list_length(&global_client_list), Count.max_tot);
143 }
144 }
145
146 /* report_and_set_user_flags()
147 *
148 * inputs - pointer to client
149 * - pointer to conf for this user
150 * output - NONE
151 * side effects - Report to user any special flags
152 * they are getting, and set them.
153 */
154 static void
155 report_and_set_user_flags(struct Client *client, const struct MaskItem *conf)
156 {
157 /* If this user is being spoofed, tell them so */
158 if (IsConfDoSpoofIp(conf))
159 sendto_one_notice(client, &me, ":*** Spoofing your IP");
160
161 /* If this user is in the exception class, set it "E lined" */
162 if (IsConfExemptKline(conf))
163 {
164 AddFlag(client, FLAGS_EXEMPTKLINE);
165 sendto_one_notice(client, &me, ":*** You are exempt from K/D lines");
166 }
167
168 if (IsConfExemptXline(conf))
169 {
170 AddFlag(client, FLAGS_EXEMPTXLINE);
171 sendto_one_notice(client, &me, ":*** You are exempt from X lines");
172 }
173
174 if (IsConfExemptResv(conf))
175 {
176 AddFlag(client, FLAGS_EXEMPTRESV);
177 sendto_one_notice(client, &me, ":*** You are exempt from resvs");
178 }
179
180 /* If this user is exempt from user limits set it "F lined" */
181 if (IsConfExemptLimits(conf))
182 {
183 AddFlag(client, FLAGS_NOLIMIT);
184 sendto_one_notice(client, &me, ":*** You are exempt from user limits");
185 }
186
187 if (IsConfCanFlood(conf))
188 {
189 AddFlag(client, FLAGS_CANFLOOD);
190 sendto_one_notice(client, &me, ":*** You are exempt from flood protection");
191 }
192 }
193
194 /* introduce_client()
195 *
196 * inputs - client
197 * output - NONE
198 * side effects - This common function introduces a client to the rest
199 * of the net, either from a local client connect or
200 * from a remote connect.
201 */
202 static void
203 introduce_client(struct Client *client)
204 {
205 dlink_node *node;
206 char buf[UMODE_MAX_STR] = "";
207
208 send_umode(client, MyConnect(client), 0, buf);
209 watch_check_hash(client, RPL_LOGON);
210
211 if (buf[0] == '\0')
212 {
213 buf[0] = '+';
214 buf[1] = '\0';
215 }
216
217 DLINK_FOREACH(node, local_server_list.head)
218 {
219 struct Client *server = node->data;
220
221 if (server == client->from)
222 continue;
223
224 sendto_one(server, ":%s UID %s %u %ju %s %s %s %s %s %s %s :%s",
225 client->servptr->id,
226 client->name, client->hopcount+1,
227 client->tsinfo,
228 buf, client->username, client->host, client->realhost,
229 client->sockhost, client->id,
230 client->account,
231 client->info);
232
233 if (!EmptyString(client->tls_certfp))
234 sendto_one(server, ":%s CERTFP %s", client->id, client->tls_certfp);
235 }
236 }
237
238 /* user_welcome()
239 *
240 * inputs - client pointer to client to welcome
241 * output - NONE
242 * side effects -
243 */
244 static void
245 user_welcome(struct Client *client)
246 {
247 static const char built_date[] = __DATE__ " at " __TIME__;
248
249 if (HasFlag(client, FLAGS_TLS))
250 {
251 AddUMode(client, UMODE_SECURE);
252
253 client->tls_cipher = xstrdup(tls_get_cipher(&client->connection->fd->tls));
254 sendto_one_notice(client, &me, ":*** Connected securely via %s",
255 client->tls_cipher);
256 }
257
258 sendto_one_numeric(client, &me, RPL_WELCOME, ConfigServerInfo.network_name,
259 client->name, client->username, client->realhost);
260 sendto_one_numeric(client, &me, RPL_YOURHOST,
261 listener_get_name(client->connection->listener), PATCHLEVEL);
262 sendto_one_numeric(client, &me, RPL_CREATED, built_date);
263 sendto_one_numeric(client, &me, RPL_MYINFO, me.name, PATCHLEVEL, umode_buffer);
264
265 isupport_show(client);
266 show_lusers(client);
267 motd_signon(client);
268 }
269
270 /*! \brief This function is called when both NICK and USER messages
271 * have been accepted for the client, in whatever order. Only
272 * after this, is the UID message propagated.
273 * \param client Pointer to given client to introduce
274 */
275 void
276 register_local_user(struct Client *client)
277 {
278 const struct MaskItem *conf = NULL;
279
280 assert(client == client->from);
281 assert(client->connection->registration == 0);
282 assert(MyConnect(client));
283 assert(IsUnknown(client));
284
285 if (ConfigGeneral.ping_cookie)
286 {
287 if (!HasFlag(client, FLAGS_PINGSENT) && client->connection->random_ping == 0)
288 {
289 do
290 client->connection->random_ping = genrand_int32();
291 while (client->connection->random_ping == 0);
292
293 sendto_one(client, "PING :%u", client->connection->random_ping);
294 AddFlag(client, FLAGS_PINGSENT);
295 return;
296 }
297
298 if (!HasFlag(client, FLAGS_PING_COOKIE))
299 return;
300 }
301
302 if (conf_check_client(client) == false)
303 return;
304
305 conf = client->connection->confs.head->data;
306
307 if (!HasFlag(client, FLAGS_GOTID))
308 {
309 char username[USERLEN + 1];
310 unsigned int i = 0;
311
312 if (IsNeedIdentd(conf))
313 {
314 ++ServerStats.is_ref;
315 sendto_one_notice(client, &me, ":*** Notice -- You need to install "
316 "identd to use this server");
317 exit_client(client, "Install identd");
318 return;
319 }
320
321 strlcpy(username, client->username, sizeof(username));
322
323 if (!IsNoTilde(conf))
324 client->username[i++] = '~';
325
326 for (const char *p = username; *p && i < USERLEN; ++p)
327 client->username[i++] = *p;
328
329 client->username[i] = '\0';
330 }
331
332 /* Password check */
333 if (!EmptyString(conf->passwd))
334 {
335 if (match_conf_password(client->connection->password, conf) == false)
336 {
337 ++ServerStats.is_ref;
338
339 sendto_one_numeric(client, &me, ERR_PASSWDMISMATCH);
340 exit_client(client, "Bad Password");
341 return;
342 }
343 }
344
345 xfree(client->connection->password);
346 client->connection->password = NULL;
347
348 /*
349 * Report if user has &^>= etc. and set flags as needed in client
350 */
351 report_and_set_user_flags(client, conf);
352
353 if (IsDead(client))
354 return;
355
356 /*
357 * Limit clients -
358 * We want to be able to have servers and F-line clients
359 * connect, so save room for "buffer" connections.
360 * Smaller servers may want to decrease this, and it should
361 * probably be just a percentage of the MAXCLIENTS...
362 * -Taner
363 */
364 if ((dlink_list_length(&local_client_list) >= GlobalSetOptions.maxclients + MAX_BUFFER) ||
365 (dlink_list_length(&local_client_list) >= GlobalSetOptions.maxclients && !HasFlag(client, FLAGS_NOLIMIT)))
366 {
367 sendto_realops_flags(UMODE_FULL, L_ALL, SEND_NOTICE,
368 "Too many clients, rejecting %s[%s].",
369 client->name, client->host);
370 ++ServerStats.is_ref;
371 exit_client(client, "Sorry, server is full - try later");
372 return;
373 }
374
375 if (valid_username(client->username, true) == false)
376 {
377 char buf[IRCD_BUFSIZE];
378
379 sendto_realops_flags(UMODE_REJ, L_ALL, SEND_NOTICE,
380 "Invalid username: %s (%s@%s)",
381 client->name, client->username, client->host);
382 ++ServerStats.is_ref;
383 snprintf(buf, sizeof(buf), "Invalid username [%s]", client->username);
384 exit_client(client, buf);
385 return;
386 }
387
388 if (!HasFlag(client, FLAGS_EXEMPTXLINE))
389 {
390 const struct GecosItem *gecos = gecos_find(client->info, match);
391 if (gecos)
392 {
393 sendto_realops_flags(UMODE_REJ, L_ALL, SEND_NOTICE,
394 "X-line Rejecting [%s] [%s], user %s [%s]",
395 client->info, gecos->reason,
396 client_get_name(client, HIDE_IP),
397 client->sockhost);
398 ++ServerStats.is_ref;
399 exit_client(client, "Bad user info");
400 return;
401 }
402 }
403
404 const char *id;
405 while (hash_find_id((id = uid_get())))
406 ;
407
408 strlcpy(client->id, id, sizeof(client->id));
409 hash_add_id(client);
410
411 sendto_realops_flags(UMODE_CCONN, L_ALL, SEND_NOTICE,
412 "Client connecting: %s (%s@%s) [%s] {%s} [%s] <%s>",
413 client->name, client->username, client->realhost,
414 client->sockhost,
415 get_client_class(&client->connection->confs),
416 client->info, client->id);
417
418 if (ConfigGeneral.invisible_on_connect)
419 {
420 AddUMode(client, UMODE_INVISIBLE);
421 ++Count.invisi;
422 }
423
424 SetClient(client);
425
426 client->servptr = &me;
427 client->connection->last_privmsg = event_base->time.sec_monotonic;
428
429 dlinkAdd(client, &client->lnode, &client->servptr->serv->client_list);
430 dlinkAdd(client, &client->node, &global_client_list);
431
432 assert(dlinkFind(&unknown_list, client));
433
434 dlink_move_node(&client->connection->lclient_node,
435 &unknown_list, &local_client_list);
436
437 if (dlink_list_length(&local_client_list) > Count.max_loc)
438 {
439 Count.max_loc = dlink_list_length(&local_client_list);
440
441 if (!(Count.max_loc % 10))
442 sendto_realops_flags(UMODE_SERVNOTICE, L_ALL, SEND_NOTICE,
443 "New maximum local client connections: %u",
444 Count.max_loc);
445 }
446
447 if ((dlink_list_length(&local_client_list) +
448 dlink_list_length(&local_server_list)) > Count.max_loc_con)
449 Count.max_loc_con = dlink_list_length(&local_client_list) +
450 dlink_list_length(&local_server_list);
451
452 if (dlink_list_length(&global_client_list) > Count.max_tot)
453 Count.max_tot = dlink_list_length(&global_client_list);
454 ++Count.totalrestartcount;
455
456 user_welcome(client);
457
458 introduce_client(client);
459 }
460
461 /* register_remote_user()
462 *
463 * inputs - client remote or directly connected client
464 * - username to register as
465 * - host name to register as
466 * - server name
467 * output - NONE
468 * side effects - This function is called when a remote client
469 * is introduced by a server.
470 */
471 void
472 register_remote_user(struct Client *client)
473 {
474 assert(client->servptr->from == client->from);
475
476 /*
477 * If the nick has been introduced by a services server,
478 * make it a service as well.
479 */
480 if (HasFlag(client->servptr, FLAGS_SERVICE))
481 AddFlag(client, FLAGS_SERVICE);
482
483 SetClient(client);
484 dlinkAdd(client, &client->lnode, &client->servptr->serv->client_list);
485 dlinkAdd(client, &client->node, &global_client_list);
486
487 if (dlink_list_length(&global_client_list) > Count.max_tot)
488 Count.max_tot = dlink_list_length(&global_client_list);
489
490 if (HasFlag(client->servptr, FLAGS_EOB))
491 sendto_realops_flags(UMODE_FARCONNECT, L_ALL, SEND_NOTICE,
492 "Client connecting at %s: %s (%s@%s) [%s] [%s] <%s>",
493 client->servptr->name,
494 client->name, client->username, client->realhost,
495 client->sockhost, client->info, client->id);
496
497 introduce_client(client);
498 }
499
500 /* valid_hostname()
501 *
502 * Inputs - pointer to hostname
503 * Output - 1 if valid, 0 if not
504 * Side effects - check hostname for validity
505 *
506 * NOTE: this doesn't allow a hostname to begin with a dot and
507 * will not allow more dots than chars.
508 */
509 bool
510 valid_hostname(const char *hostname)
511 {
512 const char *p = hostname;
513
514 assert(p);
515
516 if (EmptyString(p) || *p == '.' || *p == ':')
517 return false;
518
519 for (; *p; ++p)
520 if (!IsHostChar(*p))
521 return false;
522
523 return p - hostname <= HOSTLEN;
524 }
525
526 /* valid_username()
527 *
528 * Inputs - pointer to user
529 * Output - 1 if valid, 0 if not
530 * Side effects - check username for validity
531 *
532 * Absolutely always reject any '*' '!' '?' '@' in an user name
533 * reject any odd control characters names.
534 * Allow '.' in username to allow for "first.last"
535 * style of username
536 */
537 bool
538 valid_username(const char *username, bool local)
539 {
540 const char *p = username;
541
542 assert(p);
543
544 if (*p == '~')
545 ++p;
546
547 /*
548 * Reject usernames that don't start with an alphanum
549 * i.e. reject jokers who have '-@somehost' or '.@somehost'
550 * or "-hi-@somehost", "h-----@somehost" would still be accepted.
551 */
552 if (!IsAlNum(*p))
553 return false;
554
555 if (local)
556 {
557 unsigned int dots = 0;
558
559 while (*++p)
560 {
561 if (*p == '.' && ConfigGeneral.dots_in_ident)
562 {
563 if (++dots > ConfigGeneral.dots_in_ident)
564 return false;
565 if (!IsUserChar(*(p + 1)))
566 return false;
567 }
568 else if (!IsUserChar(*p))
569 return false;
570 }
571 }
572 else
573 {
574 while (*++p)
575 if (!IsUserChar(*p))
576 return false;
577 }
578
579 return p - username <= USERLEN;
580 }
581
582 /* clean_nick_name()
583 *
584 * input - nickname
585 * - whether it's a local nick (1) or remote (0)
586 * output - none
587 * side effects - walks through the nickname, returning 0 if erroneous
588 */
589 bool
590 valid_nickname(const char *nickname, bool local)
591 {
592 const char *p = nickname;
593
594 assert(p);
595
596 /*
597 * Nicks can't start with a digit or - or be 0 length.
598 */
599 if (EmptyString(p) || *p == '-' || (IsDigit(*p) && local))
600 return false;
601
602 for (; *p; ++p)
603 if (!IsNickChar(*p))
604 return false;
605
606 return p - nickname <= NICKLEN;
607 }
608
609 /*! \brief Builds a mode change string to buffer pointed by \a buf
610 * \param client Pointer to client
611 * \param dispatch Whether to send a MODE message to client
612 * \param old Old user mode to compare against when building new mode buffer
613 * \param buf Pointer to buffer to build string in
614 */
615 void
616 send_umode(struct Client *client, bool dispatch, unsigned int old, char *buf)
617 {
618 char *m = buf;
619 int what = 0;
620
621 /*
622 * Build a string in umode_buf to represent the change in the user's
623 * mode between the new (client->umodes) and 'old'.
624 */
625 for (const struct user_modes *tab = umode_tab; tab->c; ++tab)
626 {
627 if ((tab->flag & old) && !HasUMode(client, tab->flag))
628 {
629 if (what == MODE_DEL)
630 *m++ = tab->c;
631 else
632 {
633 what = MODE_DEL;
634 *m++ = '-';
635 *m++ = tab->c;
636 }
637 }
638 else if (!(tab->flag & old) && HasUMode(client, tab->flag))
639 {
640 if (what == MODE_ADD)
641 *m++ = tab->c;
642 else
643 {
644 what = MODE_ADD;
645 *m++ = '+';
646 *m++ = tab->c;
647 }
648 }
649 }
650
651 *m = '\0';
652
653 if (dispatch == true && *buf)
654 sendto_one(client, ":%s!%s@%s MODE %s :%s",
655 client->name, client->username,
656 client->host, client->name, buf);
657 }
658
659 /* send_umode_out()
660 *
661 * inputs -
662 * output - NONE
663 * side effects - Only send ubuf out to servers that know about this client
664 */
665 void
666 send_umode_out(struct Client *client, unsigned int old)
667 {
668 char buf[UMODE_MAX_STR] = "";
669
670 send_umode(client, MyConnect(client), old, buf);
671
672 if (buf[0])
673 sendto_server(client, 0, 0, ":%s MODE %s :%s",
674 client->id, client->id, buf);
675 }
676
677 void
678 user_set_hostmask(struct Client *client, const char *hostname)
679 {
680 dlink_node *node;
681
682 if (strcmp(client->host, hostname) == 0)
683 return;
684
685 if (ConfigGeneral.cycle_on_host_change)
686 sendto_common_channels_local(client, false, 0, CAP_CHGHOST, ":%s!%s@%s QUIT :Changing hostname",
687 client->name, client->username, client->host);
688
689 sendto_common_channels_local(client, true, CAP_CHGHOST, 0, ":%s!%s@%s CHGHOST %s %s",
690 client->name, client->username,
691 client->host, client->username, hostname);
692
693 strlcpy(client->host, hostname, sizeof(client->host));
694
695 if (MyConnect(client))
696 {
697 sendto_one_numeric(client, &me, RPL_VISIBLEHOST, client->host);
698 clear_ban_cache_list(&client->channel);
699 }
700
701 if (ConfigGeneral.cycle_on_host_change == 0)
702 return;
703
704 DLINK_FOREACH(node, client->channel.head)
705 {
706 char modebuf[CMEMBER_STATUS_FLAGS_LEN + 1];
707 char nickbuf[CMEMBER_STATUS_FLAGS_LEN * NICKLEN + CMEMBER_STATUS_FLAGS_LEN] = "";
708 char *p = modebuf;
709 int len = 0;
710 const struct ChannelMember *member = node->data;
711
712 if (has_member_flags(member, CHFL_CHANOP))
713 {
714 *p++ = 'o';
715 len += snprintf(nickbuf + len, sizeof(nickbuf) - len, len ? " %s" : "%s", client->name);
716 }
717
718 if (has_member_flags(member, CHFL_HALFOP))
719 {
720 *p++ = 'h';
721 len += snprintf(nickbuf + len, sizeof(nickbuf) - len, len ? " %s" : "%s", client->name);
722 }
723
724 if (has_member_flags(member, CHFL_VOICE))
725 {
726 *p++ = 'v';
727 len += snprintf(nickbuf + len, sizeof(nickbuf) - len, len ? " %s" : "%s", client->name);
728 }
729
730 *p = '\0';
731
732 sendto_channel_local(client, member->channel, 0, CAP_EXTENDED_JOIN, CAP_CHGHOST, ":%s!%s@%s JOIN %s %s :%s",
733 client->name, client->username,
734 client->host, member->channel->name,
735 client->account, client->info);
736 sendto_channel_local(client, member->channel, 0, 0, CAP_EXTENDED_JOIN | CAP_CHGHOST, ":%s!%s@%s JOIN :%s",
737 client->name, client->username,
738 client->host, member->channel->name);
739
740 if (nickbuf[0])
741 sendto_channel_local(client, member->channel, 0, 0, CAP_CHGHOST, ":%s MODE %s +%s %s",
742 client->servptr->name, member->channel->name,
743 modebuf, nickbuf);
744 }
745
746 if (client->away[0])
747 sendto_common_channels_local(client, false, CAP_AWAY_NOTIFY, CAP_CHGHOST,
748 ":%s!%s@%s AWAY :%s",
749 client->name, client->username,
750 client->host, client->away);
751 }

Properties

Name Value
svn:eol-style native
svn:keywords Id