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 |
|
* |
555 |
|
for (; *p; ++p) |
556 |
|
{ |
557 |
|
if (!IsServChar(*p)) |
558 |
< |
return 1; |
558 |
> |
return 0; |
559 |
|
|
560 |
|
++length; |
561 |
|
|
563 |
|
++dots; |
564 |
|
} |
565 |
|
|
566 |
< |
return !dots || length > HOSTLEN; |
566 |
> |
return dots != 0 && length <= HOSTLEN; |
567 |
|
} |
568 |
|
|
569 |
|
int |
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 |
|
|
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, |
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)) |
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 |
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 |
|
|
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); |