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

Comparing ircd-hybrid/trunk/src/s_serv.c (file contents):
Revision 3134 by michael, Thu Mar 6 20:33:17 2014 UTC vs.
Revision 3135 by michael, Mon Mar 10 21:11:25 2014 UTC

# Line 576 | Line 576 | sendnick_TS(struct Client *client_p, str
576    }
577  
578    if (IsCapable(client_p, CAP_SVS))
579 <  {
580 <    if (HasID(target_p) && IsCapable(client_p, CAP_TS6))
581 <      sendto_one(client_p, ":%s UID %s %d %lu %s %s %s %s %s %s :%s",
582 <                 target_p->servptr->id,
583 <                 target_p->name, target_p->hopcount + 1,
584 <                 (unsigned long) target_p->tsinfo,
585 <                 ubuf, target_p->username, target_p->host,
586 <                 (MyClient(target_p) && IsIPSpoof(target_p)) ?
587 <                 "0" : target_p->sockhost, target_p->id,
588 <                 target_p->svid, target_p->info);
589 <    else
590 <      sendto_one(client_p, "NICK %s %d %lu %s %s %s %s %s :%s",
591 <                 target_p->name, target_p->hopcount + 1,
592 <                 (unsigned long) target_p->tsinfo,
593 <                 ubuf, target_p->username, target_p->host,
594 <                 target_p->servptr->name, target_p->svid,
595 <                 target_p->info);
596 <  }
579 >    sendto_one(client_p, ":%s UID %s %d %lu %s %s %s %s %s %s :%s",
580 >               target_p->servptr->id,
581 >               target_p->name, target_p->hopcount + 1,
582 >               (unsigned long) target_p->tsinfo,
583 >               ubuf, target_p->username, target_p->host,
584 >               (MyClient(target_p) && IsIPSpoof(target_p)) ?
585 >               "0" : target_p->sockhost, target_p->id,
586 >               target_p->svid, target_p->info);
587    else
588 <  {
589 <    if (HasID(target_p) && IsCapable(client_p, CAP_TS6))
590 <      sendto_one(client_p, ":%s UID %s %d %lu %s %s %s %s %s :%s",
591 <                 target_p->servptr->id,
592 <                 target_p->name, target_p->hopcount + 1,
593 <                 (unsigned long) target_p->tsinfo,
594 <                 ubuf, target_p->username, target_p->host,
605 <                 (MyClient(target_p) && IsIPSpoof(target_p)) ?
606 <                 "0" : target_p->sockhost, target_p->id, target_p->info);
607 <    else
608 <      sendto_one(client_p, "NICK %s %d %lu %s %s %s %s :%s",
609 <                 target_p->name, target_p->hopcount + 1,
610 <                 (unsigned long) target_p->tsinfo,
611 <                 ubuf, target_p->username, target_p->host,
612 <                 target_p->servptr->name, target_p->info);
613 <  }
588 >    sendto_one(client_p, ":%s UID %s %d %lu %s %s %s %s %s :%s",
589 >               target_p->servptr->id,
590 >               target_p->name, target_p->hopcount + 1,
591 >               (unsigned long) target_p->tsinfo,
592 >               ubuf, target_p->username, target_p->host,
593 >               (MyClient(target_p) && IsIPSpoof(target_p)) ?
594 >               "0" : target_p->sockhost, target_p->id, target_p->info);
595  
596    if (!EmptyString(target_p->certfp))
597      sendto_one(client_p, ":%s CERTFP %s",
# Line 737 | Line 718 | server_estab(struct Client *client_p)
718    sendto_one(client_p, "SVINFO %d %d 0 :%lu", TS_CURRENT, TS_MIN,
719               (unsigned long)CurrentTime);
720  
721 <  /* assumption here is if they passed the correct TS version, they also passed an SID */
741 <  if (IsCapable(client_p, CAP_TS6))
721 >  if (HasID(client_p))
722      hash_add_id(client_p);
723  
724    /* XXX Does this ever happen? I don't think so -db */
# Line 840 | Line 820 | server_estab(struct Client *client_p)
820      if (target_p == client_p)
821        continue;
822  
823 <    if (IsCapable(target_p, CAP_TS6) && HasID(client_p))
824 <      sendto_one(target_p, ":%s SID %s 2 %s :%s%s",
825 <                 me.id, client_p->name, client_p->id,
826 <                 IsHidden(client_p) ? "(H) " : "",
847 <                 client_p->info);
848 <    else
849 <      sendto_one(target_p,":%s SERVER %s 2 :%s%s",
850 <                 me.name, client_p->name,
851 <                 IsHidden(client_p) ? "(H) " : "",
852 <                 client_p->info);
823 >    sendto_one(target_p, ":%s SID %s 2 %s :%s%s",
824 >               me.id, client_p->name, client_p->id,
825 >               IsHidden(client_p) ? "(H) " : "",
826 >               client_p->info);
827    }
828  
829    /*
# Line 879 | Line 853 | server_estab(struct Client *client_p)
853      if (IsMe(target_p) || target_p->from == client_p)
854        continue;
855  
856 <    if (IsCapable(client_p, CAP_TS6))
857 <    {
858 <      if (HasID(target_p))
859 <        sendto_one(client_p, ":%s SID %s %d %s :%s%s",
886 <                   ID(target_p->servptr), target_p->name, target_p->hopcount+1,
887 <                   target_p->id, IsHidden(target_p) ? "(H) " : "",
888 <                   target_p->info);
889 <      else  /* introducing non-ts6 server */
890 <        sendto_one(client_p, ":%s SERVER %s %d :%s%s",
891 <                   ID(target_p->servptr), target_p->name, target_p->hopcount+1,
892 <                   IsHidden(target_p) ? "(H) " : "", target_p->info);
893 <    }
894 <    else
895 <      sendto_one(client_p, ":%s SERVER %s %d :%s%s",
896 <                 target_p->servptr->name, target_p->name, target_p->hopcount+1,
897 <                 IsHidden(target_p) ? "(H) " : "", target_p->info);
856 >    sendto_one(client_p, ":%s SID %s %d %s :%s%s",
857 >               ID(target_p->servptr), target_p->name, target_p->hopcount+1,
858 >               target_p->id, IsHidden(target_p) ? "(H) " : "",
859 >               target_p->info);
860  
861      if (HasFlag(target_p, FLAGS_EOB))
862        sendto_one(client_p, ":%s EOB", ID_or_name(target_p, client_p));

Diff Legend

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