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/src/send.c (file contents), Revision 30 by adx, Sun Oct 2 20:03:27 2005 UTC vs.
ircd-hybrid-8/src/send.c (file contents), Revision 1206 by michael, Wed Aug 24 21:41:23 2011 UTC

# Line 19 | Line 19
19   *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
20   *  USA
21   *
22 < *  $Id: send.c,v 7.307 2005/10/02 12:45:07 adx Exp $
22 > *  $Id$
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"
# Line 38 | Line 38
38   #include "s_serv.h"
39   #include "sprintf_irc.h"
40   #include "s_conf.h"
41 #include "list.h"
41   #include "s_log.h"
42   #include "memory.h"
43   #include "hook.h"
45 #include "irc_getnameinfo.h"
44   #include "packet.h"
45  
48 #define LOG_BUFSIZE 2048
46  
47   struct Callback *iosend_cb = NULL;
48   struct Callback *iosendctrl_cb = NULL;
49 + static unsigned int current_serial = 0;
50  
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;
51  
52   /* send_format()
53   *
# Line 87 | Line 81 | send_format(char *lsendbuf, int bufsize,
81  
82    lsendbuf[len++] = '\r';
83    lsendbuf[len++] = '\n';
84 <  return (len);
84 >  return len;
85 > }
86 >
87 > /*
88 > * iosend_default - append a packet to the client's sendq.
89 > */
90 > void *
91 > iosend_default(va_list args)
92 > {
93 >  struct Client *to = va_arg(args, struct Client *);
94 >  int length = va_arg(args, int);
95 >  char *buf = va_arg(args, char *);
96 >
97 >  dbuf_put(&to->localClient->buf_sendq, buf, length);
98 >  return NULL;
99   }
100  
101   /*
# Line 98 | Line 106 | send_format(char *lsendbuf, int bufsize,
106   static void
107   send_message(struct Client *to, char *buf, int len)
108   {
109 < #ifdef INVARIANTS
110 <  if (IsMe(to))
103 <  {
104 <    sendto_realops_flags(UMODE_ALL, L_ALL,
105 <                         "Trying to send message to myself!");
106 <    return;
107 <  }
108 < #endif
109 >  assert(!IsMe(to));
110 >  assert(to != &me);
111  
112    if (dbuf_length(&to->localClient->buf_sendq) + len > get_sendq(to))
113    {
# Line 121 | Line 123 | send_message(struct Client *to, char *bu
123      return;
124    }
125  
126 <  dbuf_put(&to->localClient->buf_sendq, buf, len);
126 >  execute_callback(iosend_cb, to, len, buf);
127  
128    /*
129     ** Update statistics. The following is slightly incorrect
# Line 159 | Line 161 | send_message_remote(struct Client *to, s
161      return;
162    }
163  
162  if (ServerInfo.hub && IsCapable(to, CAP_LL))
163  {
164    if (((from->lazyLinkClientExists &
165          to->localClient->serverMask) == 0))
166      client_burst_if_needed(to, from);
167  }
168
164    /* Optimize by checking if (from && to) before everything */
165    /* we set to->from up there.. */
166  
# Line 185 | Line 180 | send_message_remote(struct Client *to, s
180                           from->name, from->username, from->host,
181                           to->from->name);
182  
183 <    sendto_server(NULL, to, NULL, CAP_TS6, NOCAPS, NOFLAGS,
183 >    sendto_server(NULL, NULL, CAP_TS6, NOCAPS,
184                    ":%s KILL %s :%s (%s[%s@%s] Ghosted %s)",
185                    me.id, to->name, me.name, to->name,
186                    to->username, to->host, to->from->name);
187 <    sendto_server(NULL, to, NULL, NOCAPS, CAP_TS6, NOFLAGS,
187 >    sendto_server(NULL, NULL, NOCAPS, CAP_TS6,
188                    ":%s KILL %s :%s (%s[%s@%s] Ghosted %s)",
189                    me.name, to->name, me.name, to->name,
190                    to->username, to->host, to->from->name);
# Line 281 | Line 276 | send_queued_write(struct Client *to)
276                errno = EWOULDBLOCK;
277              case SSL_ERROR_SYSCALL:
278                break;
279 <
279 >            case SSL_ERROR_SSL:
280 >              if (errno == EAGAIN)
281 >                break;
282              default:
283                retlen = errno = 0;  /* either an SSL-specific error or EOF */
284            }
# Line 291 | Line 288 | send_queued_write(struct Client *to)
288          retlen = send(to->localClient->fd.fd, first->data, first->size, 0);
289  
290        if (retlen <= 0)
294      {
295 #ifdef _WIN32
296        errno = WSAGetLastError();
297 #endif
291          break;
299      }
292  
301      execute_callback(iosend_cb, to, retlen, first->data);
293        dbuf_delete(&to->localClient->buf_sendq, retlen);
294  
295        /* We have some data written .. update counters */
# Line 460 | Line 451 | sendto_channel_butone(struct Client *one
451                        struct Channel *chptr, const char *command,
452                        const char *pattern, ...)
453   {
454 <  va_list args;
454 >  va_list alocal, aremote, auid;
455    char local_buf[IRCD_BUFSIZE];
456    char remote_buf[IRCD_BUFSIZE];
457    char uid_buf[IRCD_BUFSIZE];
458    int local_len, remote_len, uid_len;
459 <  dlink_node *ptr;
469 <  dlink_node *ptr_next;
470 <  struct Client *target_p;
459 >  dlink_node *ptr = NULL, *ptr_next = NULL;
460  
461    if (IsServer(from))
462      local_len = ircsprintf(local_buf, ":%s %s %s ",
# Line 481 | Line 470 | sendto_channel_butone(struct Client *one
470    uid_len = ircsprintf(uid_buf, ":%s %s %s ",
471                         ID(from), command, chptr->chname);
472  
473 <  va_start(args, pattern);
473 >  va_start(alocal, pattern);
474 >  va_start(aremote, pattern);
475 >  va_start(auid, pattern);
476    local_len += send_format(&local_buf[local_len], IRCD_BUFSIZE - local_len,
477 <                           pattern, args);
477 >                           pattern, alocal);
478    remote_len += send_format(&remote_buf[remote_len], IRCD_BUFSIZE - remote_len,
479 <                            pattern, args);
479 >                            pattern, aremote);
480    uid_len += send_format(&uid_buf[uid_len], IRCD_BUFSIZE - uid_len, pattern,
481 <                         args);
482 <  va_end(args);
481 >                         auid);
482 >  va_end(auid);
483 >  va_end(aremote);
484 >  va_end(alocal);
485  
486    ++current_serial;
487  
488    DLINK_FOREACH_SAFE(ptr, ptr_next, chptr->members.head)
489    {
490 <    target_p = ((struct Membership *)ptr->data)->client_p;
491 <    assert(target_p != NULL);
490 >    struct Client *target_p = ((struct Membership *)ptr->data)->client_p;
491 >
492 >    assert(IsClient(target_p));
493  
494      if (IsDefunct(target_p) || IsDeaf(target_p) || target_p->from == one)
495        continue;
496  
497 <    if (MyClient(target_p))
497 >    if (MyConnect(target_p))
498      {
499 <      if (target_p->serial != current_serial)
499 >      if (target_p->localClient->serial != current_serial)
500        {
501          send_message(target_p, local_buf, local_len);
502 <        target_p->serial = current_serial;
502 >        target_p->localClient->serial = current_serial;
503        }
504      }
505      else
# Line 513 | Line 507 | sendto_channel_butone(struct Client *one
507        /* Now check whether a message has been sent to this
508         * remote link already
509         */
510 <      if (target_p->from->serial != current_serial)
510 >      if (target_p->from->localClient->serial != current_serial)
511        {
512          if (IsCapable(target_p->from, CAP_TS6))
513            send_message_remote(target_p->from, from, uid_buf, uid_len);
514          else
515            send_message_remote(target_p->from, from, remote_buf, remote_len);
516 <        target_p->from->serial = current_serial;
516 >        target_p->from->localClient->serial = current_serial;
517        }
518      }
519    }
# Line 528 | Line 522 | sendto_channel_butone(struct Client *one
522   /* sendto_server()
523   *
524   * inputs       - pointer to client to NOT send to
525 < *              - pointer to source client required by LL (if any)
532 < *              - pointer to channel required by LL (if any)
525 > *              - pointer to channel
526   *              - caps or'd together which must ALL be present
527   *              - caps or'd together which must ALL NOT be present
535 *              - LL flags: LL_ICLIENT | LL_ICHAN
528   *              - printf style format string
529   *              - args to format string
530   * output       - NONE
531   * side effects - Send a message to all connected servers, except the
532   *                client 'one' (if non-NULL), as long as the servers
533   *                support ALL capabs in 'caps', and NO capabs in 'nocaps'.
542 *                If the server is a lazylink client, then it must know
543 *                about source_p if non-NULL (unless LL_ICLIENT is specified,
544 *                when source_p will be introduced where required) and
545 *                chptr if non-NULL (unless LL_ICHANNEL is specified, when
546 *                chptr will be introduced where required).
547 *                Note: nothing will be introduced to a LazyLeaf unless
548 *                the message is actually sent.
534   *            
535   * This function was written in an attempt to merge together the other
536   * billion sendto_*serv*() functions, which sprung up with capabs,
# Line 553 | Line 538 | sendto_channel_butone(struct Client *one
538   * -davidt
539   */
540   void
541 < sendto_server(struct Client *one, struct Client *source_p,
542 <              struct Channel *chptr, unsigned long caps,
543 <              unsigned long nocaps, unsigned long llflags,
541 > sendto_server(struct Client *one, const struct Channel *chptr,
542 >              const unsigned int caps,
543 >              const unsigned int nocaps,
544                const char *format, ...)
545   {
546    va_list args;
547 <  struct Client *client_p;
563 <  dlink_node *ptr;
547 >  dlink_node *ptr = NULL;
548    char buffer[IRCD_BUFSIZE];
549 <  int len;
549 >  int len = 0;
550  
551 <  if (chptr != NULL)
552 <  {
569 <    if (chptr->chname[0] != '#')
570 <      return;
571 <  }
551 >  if (chptr && chptr->chname[0] != '#')
552 >    return;
553  
554    va_start(args, format);
555    len = send_format(buffer, IRCD_BUFSIZE, format, args);
# Line 576 | Line 557 | sendto_server(struct Client *one, struct
557  
558    DLINK_FOREACH(ptr, serv_list.head)
559    {
560 <    client_p = ptr->data;
560 >    struct Client *client_p = ptr->data;
561  
562      /* If dead already skip */
563      if (IsDead(client_p))
# Line 591 | Line 572 | sendto_server(struct Client *one, struct
572      if ((client_p->localClient->caps & nocaps) != 0)
573        continue;
574  
594    if (ServerInfo.hub && IsCapable(client_p, CAP_LL))
595    {
596      /* check LL channel */
597      if (chptr != NULL &&
598          ((chptr->lazyLinkChannelExists &
599            client_p->localClient->serverMask) == 0))
600      {
601        /* Only introduce the channel if we really will send this message */
602        if (!(llflags & LL_ICLIENT) && source_p &&
603            ((source_p->lazyLinkClientExists &
604              client_p->localClient->serverMask) == 0))
605          continue; /* we can't introduce the unknown source_p, skip */
606
607        if (llflags & LL_ICHAN)
608          burst_channel(client_p, chptr);
609        else
610          continue; /* we can't introduce the unknown chptr, skip */
611      }
612      /* check LL client */
613      if (source_p &&
614          ((source_p->lazyLinkClientExists &
615            client_p->localClient->serverMask) == 0))
616      {
617        if (llflags & LL_ICLIENT)
618          client_burst_if_needed(client_p,source_p);
619        else
620          continue; /* we can't introduce the unknown source_p, skip */
621      }
622    }
575      send_message(client_p, buffer, len);
576    }
577   }
# Line 657 | Line 609 | sendto_common_channels_local(struct Clie
609      chptr = ((struct Membership *) cptr->data)->chptr;
610      assert(chptr != NULL);
611  
612 <    DLINK_FOREACH(uptr, chptr->locmembers.head)
612 >    DLINK_FOREACH(uptr, chptr->members.head)
613      {
614        ms = uptr->data;
615        target_p = ms->client_p;
616        assert(target_p != NULL);
617  
618 <      if (target_p == user || IsDefunct(target_p) ||
619 <          target_p->serial == current_serial)
618 >      if (!MyConnect(target_p) || target_p == user || IsDefunct(target_p) ||
619 >          target_p->localClient->serial == current_serial)
620          continue;
621  
622 <      target_p->serial = current_serial;
622 >      target_p->localClient->serial = current_serial;
623        send_message(target_p, buffer, len);
624      }
625    }
626  
627    if (touser && MyConnect(user) && !IsDead(user) &&
628 <      user->serial != current_serial)
628 >      user->localClient->serial != current_serial)
629      send_message(user, buffer, len);
630   }
631  
# Line 702 | Line 654 | sendto_channel_local(int type, int nodea
654    len = send_format(buffer, IRCD_BUFSIZE, pattern, args);
655    va_end(args);
656  
657 <  DLINK_FOREACH(ptr, chptr->locmembers.head)
657 >  DLINK_FOREACH(ptr, chptr->members.head)
658    {
659      ms = ptr->data;
660      target_p = ms->client_p;
# Line 710 | Line 662 | sendto_channel_local(int type, int nodea
662      if (type != 0 && (ms->flags & type) == 0)
663        continue;
664  
665 <    if (IsDefunct(target_p) || (nodeaf && IsDeaf(target_p)))
665 >    if (!MyConnect(target_p) || IsDefunct(target_p) ||
666 >        (nodeaf && IsDeaf(target_p)))
667        continue;
668  
669      send_message(target_p, buffer, len);
# Line 744 | Line 697 | sendto_channel_local_butone(struct Clien
697    len = send_format(buffer, IRCD_BUFSIZE, pattern, args);
698    va_end(args);
699  
700 <  DLINK_FOREACH(ptr, chptr->locmembers.head)      
700 >  DLINK_FOREACH(ptr, chptr->members.head)      
701    {  
702      ms = ptr->data;
703      target_p = ms->client_p;
# Line 752 | Line 705 | sendto_channel_local_butone(struct Clien
705      if (type != 0 && (ms->flags & type) == 0)
706        continue;
707  
708 <    if (target_p == one || IsDefunct(target_p) || IsDeaf(target_p))
708 >    if (!MyConnect(target_p) || target_p == one ||
709 >        IsDefunct(target_p) || IsDeaf(target_p))
710        continue;
711      send_message(target_p, buffer, len);
712    }
# Line 771 | Line 725 | sendto_channel_local_butone(struct Clien
725   *                remote to this server.
726   */
727   void
728 < sendto_channel_remote(struct Client *one, struct Client *from, int type, int caps,
729 <                      int nocaps, struct Channel *chptr, const char *pattern, ...)
728 > sendto_channel_remote(struct Client *one, struct Client *from, int type,
729 >                      const unsigned int caps, const unsigned int nocaps,
730 >                      struct Channel *chptr, const char *pattern, ...)
731   {
732    va_list args;
733    char buffer[IRCD_BUFSIZE];
# Line 785 | Line 740 | sendto_channel_remote(struct Client *one
740    len = send_format(buffer, IRCD_BUFSIZE, pattern, args);
741    va_end(args);
742  
743 +  ++current_serial;
744 +
745    DLINK_FOREACH(ptr, chptr->members.head)
746    {
747      ms = ptr->data;
# Line 801 | Line 758 | sendto_channel_remote(struct Client *one
758          ((target_p->from->localClient->caps & caps) != caps) ||
759          ((target_p->from->localClient->caps & nocaps) != 0))
760        continue;
761 <
762 <    send_message(target_p, buffer, len);
761 >    if (target_p->from->localClient->serial != current_serial)
762 >    {
763 >      send_message(target_p, buffer, len);
764 >      target_p->from->localClient->serial = current_serial;
765 >    }
766    }
767   }
768  
# Line 827 | Line 787 | static int
787   match_it(const struct Client *one, const char *mask, int what)
788   {
789    if (what == MATCH_HOST)
790 <    return(match(mask, one->host));
790 >    return match(mask, one->host);
791  
792 <  return(match(mask, one->servptr->name));
792 >  return match(mask, one->servptr->name);
793   }
794  
795   /* sendto_match_butone()
# Line 843 | Line 803 | void
803   sendto_match_butone(struct Client *one, struct Client *from, char *mask,
804                      int what, const char *pattern, ...)
805   {
806 <  va_list args;
806 >  va_list alocal, aremote;
807    struct Client *client_p;
808    dlink_node *ptr, *ptr_next;
809    char local_buf[IRCD_BUFSIZE], remote_buf[IRCD_BUFSIZE];
# Line 851 | Line 811 | sendto_match_butone(struct Client *one,
811                               from->username, from->host);
812    int remote_len = ircsprintf(remote_buf, ":%s ", from->name);
813  
814 <  va_start(args, pattern);
814 >  va_start(alocal, pattern);
815 >  va_start(aremote, pattern);
816    local_len += send_format(&local_buf[local_len], IRCD_BUFSIZE - local_len,
817 <                           pattern, args);
817 >                           pattern, alocal);
818    remote_len += send_format(&remote_buf[remote_len], IRCD_BUFSIZE - remote_len,
819 <                            pattern, args);
820 <  va_end(args);
819 >                            pattern, aremote);
820 >  va_end(aremote);
821 >  va_end(alocal);
822  
823    /* scan the local clients */
824    DLINK_FOREACH(ptr, local_client_list.head)
# Line 925 | Line 887 | sendto_match_servs(struct Client *source
887    vsnprintf(buffer, sizeof(buffer), pattern, args);
888    va_end(args);
889  
890 <  current_serial++;
890 >  ++current_serial;
891  
892    DLINK_FOREACH(ptr, global_serv_list.head)
893    {
# Line 935 | Line 897 | sendto_match_servs(struct Client *source
897      if (IsMe(target_p) || target_p->from == source_p->from)
898        continue;
899  
900 <    if (target_p->from->serial == current_serial)
900 >    if (target_p->from->localClient->serial == current_serial)
901        continue;
902  
903      if (match(mask, target_p->name))
# Line 944 | Line 906 | sendto_match_servs(struct Client *source
906         * if we set the serial here, then we'll never do a
907         * match() again, if !IsCapable()
908         */
909 <      target_p->from->serial = current_serial;
909 >      target_p->from->localClient->serial = current_serial;
910        found++;
911  
912        if (!IsCapable(target_p->from, cap))
# Line 1012 | Line 974 | sendto_anywhere(struct Client *to, struc
974   void
975   sendto_realops_flags(unsigned int flags, int level, const char *pattern, ...)
976   {
977 <  struct Client *client_p;
977 >  dlink_node *ptr = NULL;
978    char nbuf[IRCD_BUFSIZE];
1017  dlink_node *ptr;
979    va_list args;
980  
981    va_start(args, pattern);
# Line 1023 | Line 984 | sendto_realops_flags(unsigned int flags,
984  
985    DLINK_FOREACH(ptr, oper_list.head)
986    {
987 <    client_p = ptr->data;
987 >    struct Client *client_p = ptr->data;
988      assert(client_p->umodes & UMODE_OPER);
989  
990      /* If we're sending it to opers and theyre an admin, skip.
# Line 1039 | Line 1000 | sendto_realops_flags(unsigned int flags,
1000    }
1001   }
1002  
1003 + void
1004 + sendto_globops_flags(unsigned int flags, int level, const char *pattern, ...)
1005 + {
1006 +  dlink_node *ptr = NULL;
1007 +  char nbuf[IRCD_BUFSIZE];
1008 +  va_list args;
1009 +
1010 +  va_start(args, pattern);
1011 +  vsnprintf(nbuf, IRCD_BUFSIZE, pattern, args);
1012 +  va_end(args);
1013 +
1014 +  DLINK_FOREACH(ptr, oper_list.head)
1015 +  {
1016 +    struct Client *client_p = ptr->data;
1017 +    assert(client_p->umodes & UMODE_OPER);
1018 +
1019 +    /* If we're sending it to opers and theyre an admin, skip.
1020 +     * If we're sending it to admins, and theyre not, skip.
1021 +     */
1022 +    if (((level == L_ADMIN) && !IsAdmin(client_p)) ||
1023 +        ((level == L_OPER) && IsAdmin(client_p)))
1024 +      continue;
1025 +
1026 +    if (client_p->umodes & flags)
1027 +      sendto_one(client_p, ":%s NOTICE %s :*** Global -- %s",
1028 +                 me.name, client_p->name, nbuf);
1029 +  }
1030 + }
1031 +
1032   /* sendto_wallops_flags()
1033   *
1034   * inputs       - flag types of messages to show to real opers
# Line 1051 | Line 1041 | void
1041   sendto_wallops_flags(unsigned int flags, struct Client *source_p,
1042                       const char *pattern, ...)
1043   {
1044 <  struct Client *client_p;
1055 <  dlink_node *ptr;
1044 >  dlink_node *ptr = NULL;
1045    va_list args;
1046    char buffer[IRCD_BUFSIZE];
1047    int len;
# Line 1069 | Line 1058 | sendto_wallops_flags(unsigned int flags,
1058  
1059    DLINK_FOREACH(ptr, oper_list.head)
1060    {
1061 <    client_p = ptr->data;
1061 >    struct Client *client_p = ptr->data;
1062      assert(client_p->umodes & UMODE_OPER);
1063  
1064      if ((client_p->umodes & flags) && !IsDefunct(client_p))
# Line 1088 | Line 1077 | void
1077   ts_warn(const char *pattern, ...)
1078   {
1079    va_list args;
1080 <  char buffer[LOG_BUFSIZE];
1080 >  char buffer[IRCD_BUFSIZE];
1081    static time_t last = 0;
1082    static int warnings = 0;
1083  
# Line 1111 | Line 1100 | ts_warn(const char *pattern, ...)
1100    }
1101  
1102    va_start(args, pattern);
1103 <  vsprintf_irc(buffer, pattern, args);
1103 >  vsnprintf(buffer, sizeof(buffer), pattern, args);
1104    va_end(args);
1105  
1106    sendto_realops_flags(UMODE_ALL, L_ALL, "%s", buffer);
# Line 1165 | Line 1154 | kill_client_ll_serv_butone(struct Client
1154   {
1155    va_list args;
1156    int have_uid = 0;
1157 <  struct Client *client_p;
1169 <  dlink_node *ptr;
1157 >  dlink_node *ptr = NULL;
1158    char buf_uid[IRCD_BUFSIZE], buf_nick[IRCD_BUFSIZE];
1159 <  int len_uid = 0, len_nick;
1159 >  int len_uid = 0, len_nick = 0;
1160  
1161 <  va_start(args, pattern);
1174 <  if (HasID(source_p) && (me.id[0] != '\0'))
1161 >  if (HasID(source_p))
1162    {
1163      have_uid = 1;
1164 +    va_start(args, pattern);
1165      len_uid = ircsprintf(buf_uid, ":%s KILL %s :", me.id, ID(source_p));
1166      len_uid += send_format(&buf_uid[len_uid], IRCD_BUFSIZE - len_uid, pattern,
1167                             args);
1168 +    va_end(args);
1169    }
1170 +
1171 +  va_start(args, pattern);
1172    len_nick = ircsprintf(buf_nick, ":%s KILL %s :", me.name, source_p->name);
1173    len_nick += send_format(&buf_nick[len_nick], IRCD_BUFSIZE - len_nick, pattern,
1174                            args);
# Line 1185 | Line 1176 | kill_client_ll_serv_butone(struct Client
1176  
1177    DLINK_FOREACH(ptr, serv_list.head)
1178    {
1179 <    client_p = ptr->data;
1179 >    struct Client *client_p = ptr->data;
1180  
1181      if (one != NULL && (client_p == one->from))
1182        continue;
1183      if (IsDefunct(client_p))
1184        continue;
1185  
1186 <    /* XXX perhaps IsCapable should test for localClient itself ? -db */
1187 <    if (client_p->localClient == NULL || !IsCapable(client_p, CAP_LL) ||
1188 <        !ServerInfo.hub ||
1189 <        (source_p->lazyLinkClientExists & client_p->localClient->serverMask))
1199 <    {
1200 <      if (have_uid && IsCapable(client_p, CAP_TS6))
1201 <        send_message(client_p, buf_uid, len_uid);
1202 <      else
1203 <        send_message(client_p, buf_nick, len_nick);
1204 <    }
1186 >    if (have_uid && IsCapable(client_p, CAP_TS6))
1187 >      send_message(client_p, buf_uid, len_uid);
1188 >    else
1189 >      send_message(client_p, buf_nick, len_nick);
1190    }
1191   }

Comparing:
ircd-hybrid/src/send.c (property svn:keywords), Revision 30 by adx, Sun Oct 2 20:03:27 2005 UTC vs.
ircd-hybrid-8/src/send.c (property svn:keywords), Revision 1206 by michael, Wed Aug 24 21:41:23 2011 UTC

# Line 1 | Line 1
1 < "Id Revision"
1 > Id Revision

Diff Legend

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