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

Comparing:
ircd-hybrid-7.2/src/send.c (file contents), Revision 189 by db, Sun Oct 23 21:35:38 2005 UTC vs.
ircd-hybrid-8/src/send.c (file contents), Revision 1247 by michael, Sat Oct 1 07:54:24 2011 UTC

# Line 23 | Line 23
23   */
24  
25   #include "stdinc.h"
26 < #include "tools.h"
26 > #include "list.h"
27   #include "send.h"
28   #include "channel.h"
29   #include "client.h"
30 #include "common.h"
30   #include "dbuf.h"
31   #include "irc_string.h"
32   #include "ircd.h"
34 #include "handlers.h"
33   #include "numeric.h"
34   #include "fdlist.h"
35   #include "s_bsd.h"
36   #include "s_serv.h"
37   #include "sprintf_irc.h"
38   #include "s_conf.h"
41 #include "list.h"
39   #include "s_log.h"
40   #include "memory.h"
41   #include "hook.h"
45 #include "irc_getnameinfo.h"
42   #include "packet.h"
43  
48 #define LOG_BUFSIZE 2048
44  
45   struct Callback *iosend_cb = NULL;
46   struct Callback *iosendctrl_cb = NULL;
47 + static unsigned int current_serial = 0;
48  
53 static void send_message(struct Client *, char *, int);
54 static void send_message_remote(struct Client *, struct Client *, char *, int);
55
56 static unsigned long current_serial = 0L;
49  
50   /* send_format()
51   *
# Line 87 | Line 79 | send_format(char *lsendbuf, int bufsize,
79  
80    lsendbuf[len++] = '\r';
81    lsendbuf[len++] = '\n';
82 <  return (len);
82 >  return len;
83   }
84  
85   /*
# Line 112 | Line 104 | iosend_default(va_list args)
104   static void
105   send_message(struct Client *to, char *buf, int len)
106   {
107 < #ifdef INVARIANTS
108 <  if (IsMe(to))
117 <  {
118 <    sendto_realops_flags(UMODE_ALL, L_ALL,
119 <                         "Trying to send message to myself!");
120 <    return;
121 <  }
122 < #endif
107 >  assert(!IsMe(to));
108 >  assert(to != &me);
109  
110    if (dbuf_length(&to->localClient->buf_sendq) + len > get_sendq(to))
111    {
# Line 173 | Line 159 | send_message_remote(struct Client *to, s
159      return;
160    }
161  
176  if (ServerInfo.hub && IsCapable(to, CAP_LL))
177  {
178    if (((from->lazyLinkClientExists &
179          to->localClient->serverMask) == 0))
180      client_burst_if_needed(to, from);
181  }
182
162    /* Optimize by checking if (from && to) before everything */
163    /* we set to->from up there.. */
164  
# Line 199 | Line 178 | send_message_remote(struct Client *to, s
178                           from->name, from->username, from->host,
179                           to->from->name);
180  
181 <    sendto_server(NULL, to, NULL, CAP_TS6, NOCAPS, NOFLAGS,
181 >    sendto_server(NULL, NULL, CAP_TS6, NOCAPS,
182                    ":%s KILL %s :%s (%s[%s@%s] Ghosted %s)",
183                    me.id, to->name, me.name, to->name,
184                    to->username, to->host, to->from->name);
185 <    sendto_server(NULL, to, NULL, NOCAPS, CAP_TS6, NOFLAGS,
185 >    sendto_server(NULL, NULL, NOCAPS, CAP_TS6,
186                    ":%s KILL %s :%s (%s[%s@%s] Ghosted %s)",
187                    me.name, to->name, me.name, to->name,
188                    to->username, to->host, to->from->name);
189  
190 <    SetKilled(to);
190 >    AddFlag(to, FLAGS_KILLED);
191  
192      if (IsClient(from))
193        sendto_one(from, form_str(ERR_GHOSTEDCLIENT),
# Line 295 | Line 274 | send_queued_write(struct Client *to)
274                errno = EWOULDBLOCK;
275              case SSL_ERROR_SYSCALL:
276                break;
277 <
277 >            case SSL_ERROR_SSL:
278 >              if (errno == EAGAIN)
279 >                break;
280              default:
281                retlen = errno = 0;  /* either an SSL-specific error or EOF */
282            }
# Line 305 | Line 286 | send_queued_write(struct Client *to)
286          retlen = send(to->localClient->fd.fd, first->data, first->size, 0);
287  
288        if (retlen <= 0)
308      {
309 #ifdef _WIN32
310        errno = WSAGetLastError();
311 #endif
289          break;
313      }
290  
291        dbuf_delete(&to->localClient->buf_sendq, retlen);
292  
# Line 473 | Line 449 | sendto_channel_butone(struct Client *one
449                        struct Channel *chptr, const char *command,
450                        const char *pattern, ...)
451   {
452 <  va_list args;
452 >  va_list alocal, aremote, auid;
453    char local_buf[IRCD_BUFSIZE];
454    char remote_buf[IRCD_BUFSIZE];
455    char uid_buf[IRCD_BUFSIZE];
456    int local_len, remote_len, uid_len;
457 <  dlink_node *ptr;
482 <  dlink_node *ptr_next;
483 <  struct Client *target_p;
457 >  dlink_node *ptr = NULL, *ptr_next = NULL;
458  
459    if (IsServer(from))
460      local_len = ircsprintf(local_buf, ":%s %s %s ",
# Line 494 | Line 468 | sendto_channel_butone(struct Client *one
468    uid_len = ircsprintf(uid_buf, ":%s %s %s ",
469                         ID(from), command, chptr->chname);
470  
471 <  va_start(args, pattern);
471 >  va_start(alocal, pattern);
472 >  va_start(aremote, pattern);
473 >  va_start(auid, pattern);
474    local_len += send_format(&local_buf[local_len], IRCD_BUFSIZE - local_len,
475 <                           pattern, args);
475 >                           pattern, alocal);
476    remote_len += send_format(&remote_buf[remote_len], IRCD_BUFSIZE - remote_len,
477 <                            pattern, args);
477 >                            pattern, aremote);
478    uid_len += send_format(&uid_buf[uid_len], IRCD_BUFSIZE - uid_len, pattern,
479 <                         args);
480 <  va_end(args);
479 >                         auid);
480 >  va_end(auid);
481 >  va_end(aremote);
482 >  va_end(alocal);
483  
484    ++current_serial;
485  
486    DLINK_FOREACH_SAFE(ptr, ptr_next, chptr->members.head)
487    {
488 <    target_p = ((struct Membership *)ptr->data)->client_p;
511 <    assert(target_p != NULL);
488 >    struct Client *target_p = ((struct Membership *)ptr->data)->client_p;
489  
490 <    if (IsDefunct(target_p) || IsDeaf(target_p) || target_p->from == one)
490 >    assert(IsClient(target_p));
491 >
492 >    if (IsDefunct(target_p) || HasUMode(target_p, UMODE_DEAF) || target_p->from == one)
493        continue;
494  
495 <    if (MyClient(target_p))
495 >    if (MyConnect(target_p))
496      {
497 <      if (target_p->serial != current_serial)
497 >      if (target_p->localClient->serial != current_serial)
498        {
499          send_message(target_p, local_buf, local_len);
500 <        target_p->serial = current_serial;
500 >        target_p->localClient->serial = current_serial;
501        }
502      }
503      else
# Line 526 | Line 505 | sendto_channel_butone(struct Client *one
505        /* Now check whether a message has been sent to this
506         * remote link already
507         */
508 <      if (target_p->from->serial != current_serial)
508 >      if (target_p->from->localClient->serial != current_serial)
509        {
510          if (IsCapable(target_p->from, CAP_TS6))
511            send_message_remote(target_p->from, from, uid_buf, uid_len);
512          else
513            send_message_remote(target_p->from, from, remote_buf, remote_len);
514 <        target_p->from->serial = current_serial;
514 >        target_p->from->localClient->serial = current_serial;
515        }
516      }
517    }
# Line 541 | Line 520 | sendto_channel_butone(struct Client *one
520   /* sendto_server()
521   *
522   * inputs       - pointer to client to NOT send to
523 < *              - pointer to source client required by LL (if any)
545 < *              - pointer to channel required by LL (if any)
523 > *              - pointer to channel
524   *              - caps or'd together which must ALL be present
525   *              - caps or'd together which must ALL NOT be present
548 *              - LL flags: LL_ICLIENT | LL_ICHAN
526   *              - printf style format string
527   *              - args to format string
528   * output       - NONE
529   * side effects - Send a message to all connected servers, except the
530   *                client 'one' (if non-NULL), as long as the servers
531   *                support ALL capabs in 'caps', and NO capabs in 'nocaps'.
555 *                If the server is a lazylink client, then it must know
556 *                about source_p if non-NULL (unless LL_ICLIENT is specified,
557 *                when source_p will be introduced where required) and
558 *                chptr if non-NULL (unless LL_ICHANNEL is specified, when
559 *                chptr will be introduced where required).
560 *                Note: nothing will be introduced to a LazyLeaf unless
561 *                the message is actually sent.
532   *            
533   * This function was written in an attempt to merge together the other
534   * billion sendto_*serv*() functions, which sprung up with capabs,
# Line 566 | Line 536 | sendto_channel_butone(struct Client *one
536   * -davidt
537   */
538   void
539 < sendto_server(struct Client *one, struct Client *source_p,
540 <              struct Channel *chptr, unsigned long caps,
541 <              unsigned long nocaps, unsigned long llflags,
539 > sendto_server(struct Client *one, const struct Channel *chptr,
540 >              const unsigned int caps,
541 >              const unsigned int nocaps,
542                const char *format, ...)
543   {
544    va_list args;
545 <  struct Client *client_p;
576 <  dlink_node *ptr;
545 >  dlink_node *ptr = NULL;
546    char buffer[IRCD_BUFSIZE];
547 <  int len;
547 >  int len = 0;
548  
549 <  if (chptr != NULL)
550 <  {
582 <    if (chptr->chname[0] != '#')
583 <      return;
584 <  }
549 >  if (chptr && chptr->chname[0] != '#')
550 >    return;
551  
552    va_start(args, format);
553    len = send_format(buffer, IRCD_BUFSIZE, format, args);
# Line 589 | Line 555 | sendto_server(struct Client *one, struct
555  
556    DLINK_FOREACH(ptr, serv_list.head)
557    {
558 <    client_p = ptr->data;
558 >    struct Client *client_p = ptr->data;
559  
560      /* If dead already skip */
561      if (IsDead(client_p))
# Line 604 | Line 570 | sendto_server(struct Client *one, struct
570      if ((client_p->localClient->caps & nocaps) != 0)
571        continue;
572  
607    if (ServerInfo.hub && IsCapable(client_p, CAP_LL))
608    {
609      /* check LL channel */
610      if (chptr != NULL &&
611          ((chptr->lazyLinkChannelExists &
612            client_p->localClient->serverMask) == 0))
613      {
614        /* Only introduce the channel if we really will send this message */
615        if (!(llflags & LL_ICLIENT) && source_p &&
616            ((source_p->lazyLinkClientExists &
617              client_p->localClient->serverMask) == 0))
618          continue; /* we can't introduce the unknown source_p, skip */
619
620        if (llflags & LL_ICHAN)
621          burst_channel(client_p, chptr);
622        else
623          continue; /* we can't introduce the unknown chptr, skip */
624      }
625      /* check LL client */
626      if (source_p &&
627          ((source_p->lazyLinkClientExists &
628            client_p->localClient->serverMask) == 0))
629      {
630        if (llflags & LL_ICLIENT)
631          client_burst_if_needed(client_p,source_p);
632        else
633          continue; /* we can't introduce the unknown source_p, skip */
634      }
635    }
573      send_message(client_p, buffer, len);
574    }
575   }
# Line 670 | Line 607 | sendto_common_channels_local(struct Clie
607      chptr = ((struct Membership *) cptr->data)->chptr;
608      assert(chptr != NULL);
609  
610 <    DLINK_FOREACH(uptr, chptr->locmembers.head)
610 >    DLINK_FOREACH(uptr, chptr->members.head)
611      {
612        ms = uptr->data;
613        target_p = ms->client_p;
614        assert(target_p != NULL);
615  
616 <      if (target_p == user || IsDefunct(target_p) ||
617 <          target_p->serial == current_serial)
616 >      if (!MyConnect(target_p) || target_p == user || IsDefunct(target_p) ||
617 >          target_p->localClient->serial == current_serial)
618          continue;
619  
620 <      target_p->serial = current_serial;
620 >      target_p->localClient->serial = current_serial;
621        send_message(target_p, buffer, len);
622      }
623    }
624  
625    if (touser && MyConnect(user) && !IsDead(user) &&
626 <      user->serial != current_serial)
626 >      user->localClient->serial != current_serial)
627      send_message(user, buffer, len);
628   }
629  
# Line 715 | Line 652 | sendto_channel_local(int type, int nodea
652    len = send_format(buffer, IRCD_BUFSIZE, pattern, args);
653    va_end(args);
654  
655 <  DLINK_FOREACH(ptr, chptr->locmembers.head)
655 >  DLINK_FOREACH(ptr, chptr->members.head)
656    {
657      ms = ptr->data;
658      target_p = ms->client_p;
# Line 723 | Line 660 | sendto_channel_local(int type, int nodea
660      if (type != 0 && (ms->flags & type) == 0)
661        continue;
662  
663 <    if (IsDefunct(target_p) || (nodeaf && IsDeaf(target_p)))
663 >    if (!MyConnect(target_p) || IsDefunct(target_p) ||
664 >        (nodeaf && HasUMode(target_p, UMODE_DEAF)))
665        continue;
666  
667      send_message(target_p, buffer, len);
# Line 757 | Line 695 | sendto_channel_local_butone(struct Clien
695    len = send_format(buffer, IRCD_BUFSIZE, pattern, args);
696    va_end(args);
697  
698 <  DLINK_FOREACH(ptr, chptr->locmembers.head)      
698 >  DLINK_FOREACH(ptr, chptr->members.head)      
699    {  
700      ms = ptr->data;
701      target_p = ms->client_p;
# Line 765 | Line 703 | sendto_channel_local_butone(struct Clien
703      if (type != 0 && (ms->flags & type) == 0)
704        continue;
705  
706 <    if (target_p == one || IsDefunct(target_p) || IsDeaf(target_p))
706 >    if (!MyConnect(target_p) || target_p == one ||
707 >        IsDefunct(target_p) || HasUMode(target_p, UMODE_DEAF))
708        continue;
709      send_message(target_p, buffer, len);
710    }
# Line 784 | Line 723 | sendto_channel_local_butone(struct Clien
723   *                remote to this server.
724   */
725   void
726 < sendto_channel_remote(struct Client *one, struct Client *from, int type, int caps,
727 <                      int nocaps, struct Channel *chptr, const char *pattern, ...)
726 > sendto_channel_remote(struct Client *one, struct Client *from, int type,
727 >                      const unsigned int caps, const unsigned int nocaps,
728 >                      struct Channel *chptr, const char *pattern, ...)
729   {
730    va_list args;
731    char buffer[IRCD_BUFSIZE];
# Line 816 | Line 756 | sendto_channel_remote(struct Client *one
756          ((target_p->from->localClient->caps & caps) != caps) ||
757          ((target_p->from->localClient->caps & nocaps) != 0))
758        continue;
759 <    if (target_p->from->serial != current_serial)
759 >    if (target_p->from->localClient->serial != current_serial)
760      {
761        send_message(target_p, buffer, len);
762 <      target_p->from->serial = current_serial;
762 >      target_p->from->localClient->serial = current_serial;
763      }
764    }
765   }
# Line 845 | Line 785 | static int
785   match_it(const struct Client *one, const char *mask, int what)
786   {
787    if (what == MATCH_HOST)
788 <    return(match(mask, one->host));
788 >    return match(mask, one->host);
789  
790 <  return(match(mask, one->servptr->name));
790 >  return match(mask, one->servptr->name);
791   }
792  
793   /* sendto_match_butone()
# Line 861 | Line 801 | void
801   sendto_match_butone(struct Client *one, struct Client *from, char *mask,
802                      int what, const char *pattern, ...)
803   {
804 <  va_list args;
804 >  va_list alocal, aremote;
805    struct Client *client_p;
806    dlink_node *ptr, *ptr_next;
807    char local_buf[IRCD_BUFSIZE], remote_buf[IRCD_BUFSIZE];
# Line 869 | Line 809 | sendto_match_butone(struct Client *one,
809                               from->username, from->host);
810    int remote_len = ircsprintf(remote_buf, ":%s ", from->name);
811  
812 <  va_start(args, pattern);
812 >  va_start(alocal, pattern);
813 >  va_start(aremote, pattern);
814    local_len += send_format(&local_buf[local_len], IRCD_BUFSIZE - local_len,
815 <                           pattern, args);
815 >                           pattern, alocal);
816    remote_len += send_format(&remote_buf[remote_len], IRCD_BUFSIZE - remote_len,
817 <                            pattern, args);
818 <  va_end(args);
817 >                            pattern, aremote);
818 >  va_end(aremote);
819 >  va_end(alocal);
820  
821    /* scan the local clients */
822    DLINK_FOREACH(ptr, local_client_list.head)
# Line 943 | Line 885 | sendto_match_servs(struct Client *source
885    vsnprintf(buffer, sizeof(buffer), pattern, args);
886    va_end(args);
887  
888 <  current_serial++;
888 >  ++current_serial;
889  
890    DLINK_FOREACH(ptr, global_serv_list.head)
891    {
# Line 953 | Line 895 | sendto_match_servs(struct Client *source
895      if (IsMe(target_p) || target_p->from == source_p->from)
896        continue;
897  
898 <    if (target_p->from->serial == current_serial)
898 >    if (target_p->from->localClient->serial == current_serial)
899        continue;
900  
901      if (match(mask, target_p->name))
# Line 962 | Line 904 | sendto_match_servs(struct Client *source
904         * if we set the serial here, then we'll never do a
905         * match() again, if !IsCapable()
906         */
907 <      target_p->from->serial = current_serial;
907 >      target_p->from->localClient->serial = current_serial;
908        found++;
909  
910        if (!IsCapable(target_p->from, cap))
# Line 1030 | Line 972 | sendto_anywhere(struct Client *to, struc
972   void
973   sendto_realops_flags(unsigned int flags, int level, const char *pattern, ...)
974   {
975 <  struct Client *client_p;
975 >  dlink_node *ptr = NULL;
976    char nbuf[IRCD_BUFSIZE];
1035  dlink_node *ptr;
977    va_list args;
978  
979    va_start(args, pattern);
# Line 1041 | Line 982 | sendto_realops_flags(unsigned int flags,
982  
983    DLINK_FOREACH(ptr, oper_list.head)
984    {
985 <    client_p = ptr->data;
986 <    assert(client_p->umodes & UMODE_OPER);
985 >    struct Client *client_p = ptr->data;
986 >    assert(HasUMode(client_p, UMODE_OPER));
987  
988      /* If we're sending it to opers and theyre an admin, skip.
989       * If we're sending it to admins, and theyre not, skip.
990       */
991 <    if (((level == L_ADMIN) && !IsAdmin(client_p)) ||
992 <        ((level == L_OPER) && IsAdmin(client_p)))
991 >    if (((level == L_ADMIN) && !HasUMode(client_p, UMODE_ADMIN)) ||
992 >        ((level == L_OPER) && HasUMode(client_p, UMODE_ADMIN)))
993        continue;
994  
995 <    if (client_p->umodes & flags)
995 >    if (HasUMode(client_p, flags))
996        sendto_one(client_p, ":%s NOTICE %s :*** Notice -- %s",
997                   me.name, client_p->name, nbuf);
998    }
999   }
1000  
1001 + void
1002 + sendto_globops_flags(unsigned int flags, int level, const char *pattern, ...)
1003 + {
1004 +  dlink_node *ptr = NULL;
1005 +  char nbuf[IRCD_BUFSIZE];
1006 +  va_list args;
1007 +
1008 +  va_start(args, pattern);
1009 +  vsnprintf(nbuf, IRCD_BUFSIZE, pattern, args);
1010 +  va_end(args);
1011 +
1012 +  DLINK_FOREACH(ptr, oper_list.head)
1013 +  {
1014 +    struct Client *client_p = ptr->data;
1015 +    assert(client_p->umodes & UMODE_OPER);
1016 +
1017 +    /* If we're sending it to opers and theyre an admin, skip.
1018 +     * If we're sending it to admins, and theyre not, skip.
1019 +     */
1020 +    if (((level == L_ADMIN) && !HasUMode(client_p, UMODE_ADMIN)) ||
1021 +        ((level == L_OPER) && HasUMode(client_p, UMODE_ADMIN)))
1022 +      continue;
1023 +
1024 +    if (HasUMode(client_p, flags))
1025 +      sendto_one(client_p, ":%s NOTICE %s :*** Global -- %s",
1026 +                 me.name, client_p->name, nbuf);
1027 +  }
1028 + }
1029 +
1030   /* sendto_wallops_flags()
1031   *
1032   * inputs       - flag types of messages to show to real opers
# Line 1069 | Line 1039 | void
1039   sendto_wallops_flags(unsigned int flags, struct Client *source_p,
1040                       const char *pattern, ...)
1041   {
1042 <  struct Client *client_p;
1073 <  dlink_node *ptr;
1042 >  dlink_node *ptr = NULL;
1043    va_list args;
1044    char buffer[IRCD_BUFSIZE];
1045    int len;
# Line 1087 | Line 1056 | sendto_wallops_flags(unsigned int flags,
1056  
1057    DLINK_FOREACH(ptr, oper_list.head)
1058    {
1059 <    client_p = ptr->data;
1059 >    struct Client *client_p = ptr->data;
1060      assert(client_p->umodes & UMODE_OPER);
1061  
1062 <    if ((client_p->umodes & flags) && !IsDefunct(client_p))
1062 >    if (HasUMode(client_p, flags) && !IsDefunct(client_p))
1063        send_message(client_p, buffer, len);
1064    }
1065   }
# Line 1106 | Line 1075 | void
1075   ts_warn(const char *pattern, ...)
1076   {
1077    va_list args;
1078 <  char buffer[LOG_BUFSIZE];
1078 >  char buffer[IRCD_BUFSIZE];
1079    static time_t last = 0;
1080    static int warnings = 0;
1081  
# Line 1129 | Line 1098 | ts_warn(const char *pattern, ...)
1098    }
1099  
1100    va_start(args, pattern);
1101 <  vsprintf_irc(buffer, pattern, args);
1101 >  vsnprintf(buffer, sizeof(buffer), pattern, args);
1102    va_end(args);
1103  
1104    sendto_realops_flags(UMODE_ALL, L_ALL, "%s", buffer);
1105 <  ilog(L_CRIT, "%s", buffer);
1105 >  ilog(LOG_TYPE_IRCD, "%s", buffer);
1106   }
1107  
1108   /* kill_client()
# Line 1183 | Line 1152 | kill_client_ll_serv_butone(struct Client
1152   {
1153    va_list args;
1154    int have_uid = 0;
1155 <  struct Client *client_p;
1187 <  dlink_node *ptr;
1155 >  dlink_node *ptr = NULL;
1156    char buf_uid[IRCD_BUFSIZE], buf_nick[IRCD_BUFSIZE];
1157 <  int len_uid = 0, len_nick;
1157 >  int len_uid = 0, len_nick = 0;
1158  
1159 <  va_start(args, pattern);
1192 <  if (HasID(source_p) && (me.id[0] != '\0'))
1159 >  if (HasID(source_p))
1160    {
1161      have_uid = 1;
1162 +    va_start(args, pattern);
1163      len_uid = ircsprintf(buf_uid, ":%s KILL %s :", me.id, ID(source_p));
1164      len_uid += send_format(&buf_uid[len_uid], IRCD_BUFSIZE - len_uid, pattern,
1165                             args);
1166 +    va_end(args);
1167    }
1168 +
1169 +  va_start(args, pattern);
1170    len_nick = ircsprintf(buf_nick, ":%s KILL %s :", me.name, source_p->name);
1171    len_nick += send_format(&buf_nick[len_nick], IRCD_BUFSIZE - len_nick, pattern,
1172                            args);
# Line 1203 | Line 1174 | kill_client_ll_serv_butone(struct Client
1174  
1175    DLINK_FOREACH(ptr, serv_list.head)
1176    {
1177 <    client_p = ptr->data;
1177 >    struct Client *client_p = ptr->data;
1178  
1179      if (one != NULL && (client_p == one->from))
1180        continue;
1181      if (IsDefunct(client_p))
1182        continue;
1183  
1184 <    /* XXX perhaps IsCapable should test for localClient itself ? -db */
1185 <    if (client_p->localClient == NULL || !IsCapable(client_p, CAP_LL) ||
1186 <        !ServerInfo.hub ||
1187 <        (source_p->lazyLinkClientExists & client_p->localClient->serverMask))
1217 <    {
1218 <      if (have_uid && IsCapable(client_p, CAP_TS6))
1219 <        send_message(client_p, buf_uid, len_uid);
1220 <      else
1221 <        send_message(client_p, buf_nick, len_nick);
1222 <    }
1184 >    if (have_uid && IsCapable(client_p, CAP_TS6))
1185 >      send_message(client_p, buf_uid, len_uid);
1186 >    else
1187 >      send_message(client_p, buf_nick, len_nick);
1188    }
1189   }

Diff Legend

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