ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/ircd-hybrid/trunk/src/server.c
(Generate patch)

Comparing ircd-hybrid/trunk/src/server.c (file contents):
Revision 4737 by michael, Sun Oct 12 12:06:07 2014 UTC vs.
Revision 6602 by michael, Thu Oct 22 18:07:38 2015 UTC

# Line 1 | Line 1
1   /*
2   *  ircd-hybrid: an advanced, lightweight Internet Relay Chat Daemon (ircd)
3   *
4 < *  Copyright (c) 1997-2014 ircd-hybrid development team
4 > *  Copyright (c) 1997-2015 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
# Line 48 | Line 48
48   #include "channel.h"
49   #include "parse.h"
50  
51 #define MIN_CONN_FREQ 300
51  
52   dlink_list flatten_links;
53 < static dlink_list cap_list = { NULL, NULL, 0 };
53 > static dlink_list server_capabilities_list;
54   static void serv_connect_callback(fde_t *, int, void *);
55  
56  
# Line 67 | Line 66 | void
66   write_links_file(void *unused)
67   {
68    FILE *file = NULL;
69 <  dlink_node *ptr = NULL, *ptr_next = NULL;
69 >  dlink_node *node = NULL, *node_next = NULL;
70    char buff[IRCD_BUFSIZE] = "";
71  
72 <  if ((file = fopen(LIPATH, "w")) == NULL)
72 >  if (EmptyString(ConfigServerHide.flatten_links_file))
73      return;
74  
75 <  DLINK_FOREACH_SAFE(ptr, ptr_next, flatten_links.head)
75 >  if ((file = fopen(ConfigServerHide.flatten_links_file, "w")) == NULL)
76    {
77 <    dlinkDelete(ptr, &flatten_links);
78 <    MyFree(ptr->data);
79 <    free_dlink_node(ptr);
77 >    ilog(LOG_TYPE_IRCD, "Couldn't open \"%s\": %s", ConfigServerHide.flatten_links_file,
78 >         strerror(errno));
79 >    return;
80 >  }
81 >
82 >  DLINK_FOREACH_SAFE(node, node_next, flatten_links.head)
83 >  {
84 >    dlinkDelete(node, &flatten_links);
85 >    MyFree(node->data);
86 >    free_dlink_node(node);
87    }
88  
89 <  DLINK_FOREACH(ptr, global_server_list.head)
89 >  DLINK_FOREACH(node, global_server_list.head)
90    {
91 <    const struct Client *target_p = ptr->data;
91 >    const struct Client *target_p = node->data;
92  
93      /*
94       * Skip hidden servers, aswell as ourselves, since we already send
# Line 119 | Line 125 | read_links_file(void)
125    char *p = NULL;
126    char buff[IRCD_BUFSIZE] = "";
127  
128 <  if ((file = fopen(LIPATH, "r")) == NULL)
128 >  if (EmptyString(ConfigServerHide.flatten_links_file))
129      return;
130  
131 +  if ((file = fopen(ConfigServerHide.flatten_links_file, "r")) == NULL)
132 +  {
133 +    ilog(LOG_TYPE_IRCD, "Couldn't open \"%s\": %s", ConfigServerHide.flatten_links_file,
134 +         strerror(errno));
135 +    return;
136 +  }
137 +
138    while (fgets(buff, sizeof(buff), file))
139    {
140      if ((p = strchr(buff, '\n')))
# Line 157 | Line 170 | hunt_server(struct Client *source_p, con
170              const int server, const int parc, char *parv[])
171   {
172    struct Client *target_p = NULL;
173 <  dlink_node *ptr = NULL;
173 >  dlink_node *node = NULL;
174  
175    /* Assume it's me, if no server */
176    if (parc <= server || EmptyString(parv[server]))
# Line 177 | Line 190 | hunt_server(struct Client *source_p, con
190  
191    if (!target_p && has_wildcards(parv[server]))
192    {
193 <    DLINK_FOREACH(ptr, global_client_list.head)
193 >    DLINK_FOREACH(node, global_server_list.head)
194      {
195 <      struct Client *tmp = ptr->data;
195 >      struct Client *tmp = node->data;
196  
197 <      assert(IsMe(tmp) || IsServer(tmp) || IsClient(tmp));
197 >      assert(IsMe(tmp) || IsServer(tmp));
198        if (!match(parv[server], tmp->name))
199        {
200          if (tmp->from == source_p->from && !MyConnect(tmp))
201            continue;
202  
203 <        target_p = ptr->data;
203 >        target_p = node->data;
204          break;
205        }
206      }
207 +
208 +    if (!target_p)
209 +    {
210 +      DLINK_FOREACH(node, global_client_list.head)
211 +      {
212 +        struct Client *tmp = node->data;
213 +
214 +        assert(IsMe(tmp) || IsServer(tmp) || IsClient(tmp));
215 +        if (!match(parv[server], tmp->name))
216 +        {
217 +          if (tmp->from == source_p->from && !MyConnect(tmp))
218 +            continue;
219 +
220 +          target_p = node->data;
221 +          break;
222 +        }
223 +      }
224 +    }
225    }
226  
227    if (target_p)
# Line 223 | Line 254 | hunt_server(struct Client *source_p, con
254   void
255   try_connections(void *unused)
256   {
257 <  dlink_node *ptr = NULL;
227 <  int confrq = 0;
257 >  dlink_node *node = NULL;
258  
259    /* TODO: change this to set active flag to 0 when added to event! --Habeeb */
260    if (GlobalSetOptions.autoconn == 0)
261      return;
262  
263 <  DLINK_FOREACH(ptr, server_items.head)
263 >  DLINK_FOREACH(node, server_items.head)
264    {
265 <    struct MaskItem *conf = ptr->data;
265 >    struct MaskItem *conf = node->data;
266  
267      assert(conf->type == CONF_SERVER);
268  
# Line 253 | Line 283 | try_connections(void *unused)
283  
284      assert(conf->class);
285  
286 <    confrq = conf->class->con_freq;
257 <    if (confrq < MIN_CONN_FREQ)
258 <      confrq = MIN_CONN_FREQ;
259 <
260 <    conf->until = CurrentTime + confrq;
286 >    conf->until = CurrentTime + conf->class->con_freq;
287  
288      /*
289       * Found a CONNECT config with port specified, scan clients
# Line 268 | Line 294 | try_connections(void *unused)
294  
295      if (conf->class->ref_count < conf->class->max_total)
296      {
297 <      /* Go to the end of the list, if not already last */
298 <      if (ptr->next)
297 >      /* Move this entry to the end of the list, if not already last */
298 >      if (node->next)
299        {
300 <        dlinkDelete(ptr, &server_items);
300 >        dlinkDelete(node, &server_items);
301          dlinkAddTail(conf, &conf->node, &server_items);
302        }
303  
# Line 288 | Line 314 | try_connections(void *unused)
314         *   -- adrian
315         */
316        if (ConfigServerHide.hide_server_ips)
317 <        sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE,
317 >        sendto_realops_flags(UMODE_SERVNOTICE, L_ALL, SEND_NOTICE,
318                               "Connection to %s activated.",
319                               conf->name);
320        else
321 <        sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE,
321 >        sendto_realops_flags(UMODE_SERVNOTICE, L_ALL, SEND_NOTICE,
322                               "Connection to %s[%s] activated.",
323                               conf->name, conf->host);
324  
# Line 324 | Line 350 | valid_servname(const char *name)
350   int
351   check_server(const char *name, struct Client *client_p)
352   {
353 <  dlink_node *ptr;
353 >  dlink_node *node = NULL;
354    struct MaskItem *conf        = NULL;
355    struct MaskItem *server_conf = NULL;
356    int error = -1;
357  
358    assert(client_p);
359  
360 <  /* loop through looking for all possible connect items that might work */
361 <  DLINK_FOREACH(ptr, server_items.head)
360 >  /* Loop through looking for all possible connect items that might work */
361 >  DLINK_FOREACH(node, server_items.head)
362    {
363 <    conf = ptr->data;
363 >    conf = node->data;
364  
365      if (match(name, conf->name))
366        continue;
# Line 364 | Line 390 | check_server(const char *name, struct Cl
390  
391    attach_conf(client_p, server_conf);
392  
393 <
368 <  if (server_conf)
393 >  switch (server_conf->aftype)
394    {
395 <    struct sockaddr_in *v4;
371 <    struct sockaddr_in6 *v6;
372 <
373 <    switch (server_conf->aftype)
395 >    case AF_INET6:
396      {
397 <      case AF_INET6:
376 <        v6 = (struct sockaddr_in6 *)&server_conf->addr;
397 >      const struct sockaddr_in6 *v6 = (struct sockaddr_in6 *)&server_conf->addr;
398  
399 <        if (IN6_IS_ADDR_UNSPECIFIED(&v6->sin6_addr))
400 <          memcpy(&server_conf->addr, &client_p->connection->ip, sizeof(struct irc_ssaddr));
401 <        break;
402 <      case AF_INET:
403 <        v4 = (struct sockaddr_in *)&server_conf->addr;
399 >      if (IN6_IS_ADDR_UNSPECIFIED(&v6->sin6_addr))
400 >        memcpy(&server_conf->addr, &client_p->connection->ip, sizeof(struct irc_ssaddr));
401 >      break;
402 >    }
403 >    case AF_INET:
404 >    {
405 >      const struct sockaddr_in *v4 = (struct sockaddr_in *)&server_conf->addr;
406  
407 <        if (v4->sin_addr.s_addr == INADDR_NONE)
408 <          memcpy(&server_conf->addr, &client_p->connection->ip, sizeof(struct irc_ssaddr));
409 <        break;
407 >      if (v4->sin_addr.s_addr == INADDR_NONE)
408 >        memcpy(&server_conf->addr, &client_p->connection->ip, sizeof(struct irc_ssaddr));
409 >      break;
410      }
411    }
412  
# Line 400 | Line 423 | check_server(const char *name, struct Cl
423   *                modules to dynamically add or subtract their capability.
424   */
425   void
426 < add_capability(const char *capab_name, int cap_flag, int add_to_default)
426 > add_capability(const char *name, unsigned int flag)
427   {
428    struct Capability *cap = MyCalloc(sizeof(*cap));
429  
430 <  cap->name = xstrdup(capab_name);
431 <  cap->cap = cap_flag;
432 <  dlinkAdd(cap, &cap->node, &cap_list);
410 <
411 <  if (add_to_default)
412 <    default_server_capabs |= cap_flag;
430 >  cap->name = xstrdup(name);
431 >  cap->cap = flag;
432 >  dlinkAdd(cap, &cap->node, &server_capabilities_list);
433   }
434  
435   /* delete_capability()
# Line 418 | Line 438 | add_capability(const char *capab_name, i
438   * output       - NONE
439   * side effects - delete given capability from ones known.
440   */
441 < int
442 < delete_capability(const char *capab_name)
441 > void
442 > delete_capability(const char *name)
443   {
444 <  dlink_node *ptr = NULL, *ptr_next = NULL;
444 >  dlink_node *node = NULL, *node_next = NULL;
445  
446 <  DLINK_FOREACH_SAFE(ptr, ptr_next, cap_list.head)
446 >  DLINK_FOREACH_SAFE(node, node_next, server_capabilities_list.head)
447    {
448 <    struct Capability *cap = ptr->data;
448 >    struct Capability *cap = node->data;
449  
450 <    if (cap->cap)
450 >    if (!irccmp(cap->name, name))
451      {
452 <      if (!irccmp(cap->name, capab_name))
453 <      {
454 <        default_server_capabs &= ~(cap->cap);
435 <        dlinkDelete(ptr, &cap_list);
436 <        MyFree(cap->name);
437 <        MyFree(cap);
438 <      }
452 >      dlinkDelete(node, &server_capabilities_list);
453 >      MyFree(cap->name);
454 >      MyFree(cap);
455      }
456    }
441
442  return 0;
457   }
458  
459   /*
# Line 450 | Line 464 | delete_capability(const char *capab_name
464   * side effects - none
465   */
466   unsigned int
467 < find_capability(const char *capab)
467 > find_capability(const char *name)
468   {
469 <  const dlink_node *ptr = NULL;
469 >  const dlink_node *node = NULL;
470  
471 <  DLINK_FOREACH(ptr, cap_list.head)
471 >  DLINK_FOREACH(node, server_capabilities_list.head)
472    {
473 <    const struct Capability *cap = ptr->data;
473 >    const struct Capability *cap = node->data;
474  
475 <    if (cap->cap && !irccmp(cap->name, capab))
475 >    if (!irccmp(cap->name, name))
476        return cap->cap;
477    }
478  
# Line 474 | Line 488 | find_capability(const char *capab)
488   *
489   */
490   void
491 < send_capabilities(struct Client *client_p, int cap_can_send)
491 > send_capabilities(struct Client *client_p)
492   {
493    char buf[IRCD_BUFSIZE] = "";
494 <  const dlink_node *ptr = NULL;
494 >  const dlink_node *node = NULL;
495  
496 <  DLINK_FOREACH(ptr, cap_list.head)
496 >  DLINK_FOREACH(node, server_capabilities_list.head)
497    {
498 <    const struct Capability *cap = ptr->data;
498 >    const struct Capability *cap = node->data;
499  
500 <    if (cap->cap & (cap_can_send|default_server_capabs))
501 <    {
502 <      strlcat(buf, cap->name, sizeof(buf));
503 <      if (ptr->next)
490 <        strlcat(buf, " ", sizeof(buf));
491 <    }
500 >    strlcat(buf, cap->name, sizeof(buf));
501 >
502 >    if (node->next)
503 >      strlcat(buf, " ", sizeof(buf));
504    }
505  
506    sendto_one(client_p, "CAPAB :%s", buf);
# Line 505 | Line 517 | const char *
517   show_capabilities(const struct Client *target_p)
518   {
519    static char msgbuf[IRCD_BUFSIZE] = "";
520 <  const dlink_node *ptr = NULL;
520 >  const dlink_node *node = NULL;
521  
522    strlcpy(msgbuf, "TS", sizeof(msgbuf));
523  
524 <  DLINK_FOREACH(ptr, cap_list.head)
524 >  DLINK_FOREACH(node, server_capabilities_list.head)
525    {
526 <    const struct Capability *cap = ptr->data;
526 >    const struct Capability *cap = node->data;
527  
528      if (!IsCapable(target_p, cap->cap))
529        continue;
# Line 572 | Line 584 | serv_connect(struct MaskItem *conf, stru
584    /* Make sure conf is useful */
585    assert(conf);
586  
587 <  getnameinfo((struct sockaddr *)&conf->addr, conf->addr.ss_len,
587 >  getnameinfo((const struct sockaddr *)&conf->addr, conf->addr.ss_len,
588                buf, sizeof(buf), NULL, 0, NI_NUMERICHOST);
589    ilog(LOG_TYPE_IRCD, "Connect to %s[%s] @%s", conf->name, conf->host,
590         buf);
# Line 580 | Line 592 | serv_connect(struct MaskItem *conf, stru
592    /* Still processing a DNS lookup? -> exit */
593    if (conf->dns_pending)
594    {
595 <    sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE,
595 >    sendto_realops_flags(UMODE_SERVNOTICE, L_ALL, SEND_NOTICE,
596                           "Error connecting to %s: DNS lookup for connect{} in progress.",
597                           conf->name);
598      return 0;
# Line 588 | Line 600 | serv_connect(struct MaskItem *conf, stru
600  
601    if (conf->dns_failed)
602    {
603 <    sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE,
603 >    sendto_realops_flags(UMODE_SERVNOTICE, L_ALL, SEND_NOTICE,
604                           "Error connecting to %s: DNS lookup for connect{} failed.",
605                           conf->name);
606      return 0;
# Line 599 | Line 611 | serv_connect(struct MaskItem *conf, stru
611     */
612    if ((client_p = hash_find_server(conf->name)))
613    {
614 <    sendto_realops_flags(UMODE_ALL, L_ADMIN, SEND_NOTICE,
614 >    sendto_realops_flags(UMODE_SERVNOTICE, L_ADMIN, SEND_NOTICE,
615                           "Server %s already present from %s",
616                           conf->name, get_client_name(client_p, SHOW_IP));
617 <    sendto_realops_flags(UMODE_ALL, L_OPER, SEND_NOTICE,
617 >    sendto_realops_flags(UMODE_SERVNOTICE, L_OPER, SEND_NOTICE,
618                           "Server %s already present from %s",
619                           conf->name, get_client_name(client_p, MASK_IP));
620      if (by && IsClient(by) && !MyClient(by))
# Line 640 | Line 652 | serv_connect(struct MaskItem *conf, stru
652     */
653    if (!attach_connect_block(client_p, conf->name, conf->host))
654    {
655 <    sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE,
655 >    sendto_realops_flags(UMODE_SERVNOTICE, L_ALL, SEND_NOTICE,
656                           "Host %s is not enabled for connecting: no connect {} block",
657                           conf->name);
658      if (by && IsClient(by) && !MyClient(by))
# Line 757 | Line 769 | finish_ssl_server_handshake(struct Clien
769                          client_p->name, CONF_SERVER);
770    if (conf == NULL)
771    {
772 <    sendto_realops_flags(UMODE_ALL, L_ADMIN, SEND_NOTICE,
773 <                         "Lost connect{} block for %s", get_client_name(client_p, HIDE_IP));
774 <    sendto_realops_flags(UMODE_ALL, L_OPER, SEND_NOTICE,
772 >    sendto_realops_flags(UMODE_SERVNOTICE, L_ADMIN, SEND_NOTICE,
773 >                         "Lost connect{} block for %s", get_client_name(client_p, SHOW_IP));
774 >    sendto_realops_flags(UMODE_SERVNOTICE, L_OPER, SEND_NOTICE,
775                           "Lost connect{} block for %s", get_client_name(client_p, MASK_IP));
776  
777      exit_client(client_p, "Lost connect{} block");
# Line 768 | Line 780 | finish_ssl_server_handshake(struct Clien
780  
781    sendto_one(client_p, "PASS %s TS %d %s", conf->spasswd, TS_CURRENT, me.id);
782  
783 <  send_capabilities(client_p, 0);
783 >  send_capabilities(client_p);
784  
785    sendto_one(client_p, "SERVER %s 1 :%s%s",
786               me.name, ConfigServerHide.hidden ? "(H) " : "",
787               me.info);
788  
789 <  /* If we've been marked dead because a send failed, just exit
789 >  /*
790 >   * If we've been marked dead because a send failed, just exit
791     * here now and save everyone the trouble of us ever existing.
792     */
793    if (IsDead(client_p))
794    {
795 <      sendto_realops_flags(UMODE_ALL, L_ADMIN, SEND_NOTICE,
796 <                           "%s[%s] went dead during handshake",
797 <                           client_p->name,
798 <                           client_p->host);
799 <      sendto_realops_flags(UMODE_ALL, L_OPER, SEND_NOTICE,
787 <                           "%s went dead during handshake", client_p->name);
788 <      return;
795 >    sendto_realops_flags(UMODE_SERVNOTICE, L_ADMIN, SEND_NOTICE,
796 >                         "%s went dead during handshake", get_client_name(client_p, SHOW_IP));
797 >    sendto_realops_flags(UMODE_SERVNOTICE, L_OPER, SEND_NOTICE,
798 >                         "%s went dead during handshake", get_client_name(client_p, MASK_IP));
799 >    return;
800    }
801  
802    /* don't move to serv_list yet -- we haven't sent a burst! */
# Line 821 | Line 832 | ssl_server_handshake(fde_t *fd, void *da
832        default:
833        {
834          const char *sslerr = ERR_error_string(ERR_get_error(), NULL);
835 <        sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE,
835 >        sendto_realops_flags(UMODE_SERVNOTICE, L_ALL, SEND_NOTICE,
836                               "Error connecting to %s: %s", client_p->name,
837                               sslerr ? sslerr : "unknown SSL error");
838          exit_client(client_p, "Error during SSL handshake");
# Line 860 | Line 871 | ssl_server_handshake(fde_t *fd, void *da
871   }
872  
873   static void
874 < ssl_connect_init(struct Client *client_p, struct MaskItem *conf, fde_t *fd)
874 > ssl_connect_init(struct Client *client_p, const struct MaskItem *conf, fde_t *fd)
875   {
876    if ((client_p->connection->fd.ssl = SSL_new(ConfigServerInfo.client_ctx)) == NULL)
877    {
# Line 891 | Line 902 | ssl_connect_init(struct Client *client_p
902   static void
903   serv_connect_callback(fde_t *fd, int status, void *data)
904   {
905 <  struct Client *client_p = data;
906 <  struct MaskItem *conf = NULL;
905 >  struct Client *const client_p = data;
906 >  const struct MaskItem *conf = NULL;
907  
908    /* First, make sure it's a real client! */
909    assert(client_p);
# Line 905 | Line 916 | serv_connect_callback(fde_t *fd, int sta
916    /* Check the status */
917    if (status != COMM_OK)
918    {
919 <    /* We have an error, so report it and quit
920 <     * Admins get to see any IP, mere opers don't *sigh*
919 >    /* We have an error, so report it and quit */
920 >    sendto_realops_flags(UMODE_SERVNOTICE, L_ADMIN, SEND_NOTICE,
921 >                         "Error connecting to %s: %s",
922 >                         get_client_name(client_p, SHOW_IP), comm_errstr(status));
923 >    sendto_realops_flags(UMODE_SERVNOTICE, L_OPER, SEND_NOTICE,
924 >                         "Error connecting to %s: %s",
925 >                         get_client_name(client_p, MASK_IP), comm_errstr(status));
926 >
927 >    /*
928 >     * If a fd goes bad, call dead_link() the socket is no
929 >     * longer valid for reading or writing.
930       */
931 <     if (ConfigServerHide.hide_server_ips)
932 <       sendto_realops_flags(UMODE_ALL, L_ADMIN, SEND_NOTICE,
913 <                            "Error connecting to %s: %s",
914 <                            client_p->name, comm_errstr(status));
915 <     else
916 <       sendto_realops_flags(UMODE_ALL, L_ADMIN, SEND_NOTICE,
917 <                            "Error connecting to %s[%s]: %s", client_p->name,
918 <                            client_p->host, comm_errstr(status));
919 <
920 <     sendto_realops_flags(UMODE_ALL, L_OPER, SEND_NOTICE,
921 <                          "Error connecting to %s: %s",
922 <                          client_p->name, comm_errstr(status));
923 <
924 <     /* If a fd goes bad, call dead_link() the socket is no
925 <      * longer valid for reading or writing.
926 <      */
927 <     dead_link_on_write(client_p, 0);
928 <     return;
931 >    dead_link_on_write(client_p, 0);
932 >    return;
933    }
934  
935    /* COMM_OK, so continue the connection procedure */
# Line 934 | Line 938 | serv_connect_callback(fde_t *fd, int sta
938                          client_p->name, CONF_SERVER);
939    if (conf == NULL)
940    {
941 <    sendto_realops_flags(UMODE_ALL, L_ADMIN, SEND_NOTICE,
942 <                         "Lost connect{} block for %s", get_client_name(client_p, HIDE_IP));
943 <    sendto_realops_flags(UMODE_ALL, L_OPER, SEND_NOTICE,
941 >    sendto_realops_flags(UMODE_SERVNOTICE, L_ADMIN, SEND_NOTICE,
942 >                         "Lost connect{} block for %s", get_client_name(client_p, SHOW_IP));
943 >    sendto_realops_flags(UMODE_SERVNOTICE, L_OPER, SEND_NOTICE,
944                           "Lost connect{} block for %s", get_client_name(client_p, MASK_IP));
945  
946      exit_client(client_p, "Lost connect{} block");
# Line 956 | Line 960 | serv_connect_callback(fde_t *fd, int sta
960  
961    sendto_one(client_p, "PASS %s TS %d %s", conf->spasswd, TS_CURRENT, me.id);
962  
963 <  send_capabilities(client_p, 0);
963 >  send_capabilities(client_p);
964  
965    sendto_one(client_p, "SERVER %s 1 :%s%s", me.name,
966               ConfigServerHide.hidden ? "(H) " : "", me.info);
967  
968 <  /* If we've been marked dead because a send failed, just exit
968 >  /*
969 >   * If we've been marked dead because a send failed, just exit
970     * here now and save everyone the trouble of us ever existing.
971     */
972    if (IsDead(client_p))
973    {
974 <      sendto_realops_flags(UMODE_ALL, L_ADMIN, SEND_NOTICE,
975 <                           "%s[%s] went dead during handshake",
976 <                           client_p->name,
977 <                           client_p->host);
978 <      sendto_realops_flags(UMODE_ALL, L_OPER, SEND_NOTICE,
974 <                           "%s went dead during handshake", client_p->name);
975 <      return;
974 >    sendto_realops_flags(UMODE_SERVNOTICE, L_ADMIN, SEND_NOTICE,
975 >                         "%s went dead during handshake", get_client_name(client_p, SHOW_IP));
976 >    sendto_realops_flags(UMODE_SERVNOTICE, L_OPER, SEND_NOTICE,
977 >                         "%s went dead during handshake", get_client_name(client_p, MASK_IP));
978 >    return;
979    }
980  
981    /* don't move to serv_list yet -- we haven't sent a burst! */

Diff Legend

Removed lines
+ Added lines
< Changed lines (old)
> Changed lines (new)