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

Comparing ircd-hybrid-7.3/src/s_serv.c (file contents):
Revision 1115 by michael, Tue Dec 21 14:42:54 2010 UTC vs.
Revision 1118 by michael, Thu Jan 6 13:39:10 2011 UTC

# Line 236 | Line 236 | check_cipher(struct Client *client_p, st
236   }
237   #endif /* HAVE_LIBCRYPTO */
238  
239 /* my_name_for_link()
240 * return wildcard name of my server name
241 * according to given config entry --Jto
242 */
243 const char *
244 my_name_for_link(struct ConfItem *conf)
245 {
246  struct AccessItem *aconf;
247
248  aconf = (struct AccessItem *)map_to_conf(conf);
249  if (aconf->fakename != NULL)
250    return aconf->fakename;
251  else
252    return me.name;
253 }
254
239   /*
240   * write_links_file
241   *
# Line 571 | Line 555 | valid_servname(const char *name)
555    for (; *p; ++p)
556    {
557      if (!IsServChar(*p))
558 <      return 1;
558 >      return 0;
559  
560      ++length;
561  
# Line 579 | Line 563 | valid_servname(const char *name)
563        ++dots;
564    }
565  
566 <  return !dots || length > HOSTLEN;
566 >  return dots != 0 && length <= HOSTLEN;
567   }
568  
569   int
# Line 1051 | Line 1035 | server_estab(struct Client *client_p)
1035       * Nagle is already disabled at this point --adx
1036       */
1037      sendto_one(client_p, "SERVER %s 1 :%s%s",
1038 <               my_name_for_link(conf),
1055 <               ConfigServerHide.hidden ? "(H) " : "", me.info);
1038 >               me.name, ConfigServerHide.hidden ? "(H) " : "", me.info);
1039      send_queued_write(client_p);
1040    }
1041  
# Line 1162 | Line 1145 | server_estab(struct Client *client_p)
1145      if (target_p == client_p)
1146        continue;
1147  
1165    if ((conf = target_p->serv->sconf) &&
1166         match(my_name_for_link(conf), client_p->name))
1167      continue;
1168
1148      if (IsCapable(target_p, CAP_TS6) && HasID(client_p))
1149        sendto_one(target_p, ":%s SID %s 2 %s :%s%s",
1150                   me.id, client_p->name, client_p->id,
# Line 1196 | Line 1175 | server_estab(struct Client *client_p)
1175    **    is destroyed...)
1176    */
1177  
1199  conf = client_p->serv->sconf;
1200
1178    DLINK_FOREACH_PREV(ptr, global_serv_list.tail)
1179    {
1180      target_p = ptr->data;
1181  
1182      /* target_p->from == target_p for target_p == client_p */
1183 <    if (target_p->from == client_p)
1207 <      continue;
1208 <
1209 <    if (match(my_name_for_link(conf), target_p->name))
1183 >    if (IsMe(target_p) || target_p->from == client_p)
1184        continue;
1185  
1186      if (IsCapable(client_p, CAP_TS6))
# Line 1874 | Line 1848 | serv_connect_callback(fde_t *fd, int sta
1848                      | (IsConfTopicBurst(aconf) ? CAP_TBURST|CAP_TB : 0), 0);
1849  
1850    sendto_one(client_p, "SERVER %s 1 :%s%s",
1851 <             my_name_for_link(conf),
1878 <             ConfigServerHide.hidden ? "(H) " : "",
1851 >             me.name, ConfigServerHide.hidden ? "(H) " : "",
1852               me.info);
1853  
1854    /* If we've been marked dead because a send failed, just exit
# Line 1908 | Line 1881 | find_servconn_in_progress(const char *na
1881      cptr = ptr->data;
1882  
1883      if (cptr && cptr->name[0])
1884 <      if (match(cptr->name, name) || match(name, cptr->name))
1884 >      if (match(name, cptr->name))
1885          return cptr;
1886    }
1887    
# Line 1985 | Line 1958 | cryptlink_init(struct Client *client_p,
1958  
1959    sendto_one(client_p, "PASS . TS %d %s", TS_CURRENT, me.id);
1960    sendto_one(client_p, "CRYPTLINK SERV %s %s :%s%s",
1961 <             my_name_for_link(conf), key_to_send,
1961 >             me.name, key_to_send,
1962               ConfigServerHide.hidden ? "(H) " : "", me.info);
1963  
1964    SetHandshake(client_p);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines