| 404 |
|
|
| 405 |
|
assert(client_p != NULL); |
| 406 |
|
|
| 407 |
– |
if (client_p == NULL) |
| 408 |
– |
return(error); |
| 409 |
– |
|
| 410 |
– |
if (strlen(name) > HOSTLEN) |
| 411 |
– |
return(-4); |
| 412 |
– |
|
| 407 |
|
/* loop through looking for all possible connect items that might work */ |
| 408 |
|
DLINK_FOREACH(ptr, server_items.head) |
| 409 |
|
{ |
| 421 |
|
match(aconf->host, client_p->sockhost)) |
| 422 |
|
{ |
| 423 |
|
error = -2; |
| 430 |
– |
{ |
| 431 |
– |
/* A NULL password is as good as a bad one */ |
| 432 |
– |
if (EmptyString(client_p->localClient->passwd)) |
| 433 |
– |
return(-2); |
| 434 |
– |
|
| 435 |
– |
/* code in s_conf.c should not have allowed this to be NULL */ |
| 436 |
– |
if (aconf->passwd == NULL) |
| 437 |
– |
return(-2); |
| 424 |
|
|
| 425 |
< |
if (IsConfEncrypted(aconf)) |
| 426 |
< |
{ |
| 427 |
< |
if (strcmp(aconf->passwd, |
| 428 |
< |
(const char *)crypt(client_p->localClient->passwd, |
| 443 |
< |
aconf->passwd)) == 0) |
| 444 |
< |
server_conf = conf; |
| 445 |
< |
} |
| 446 |
< |
else |
| 447 |
< |
{ |
| 448 |
< |
if (strcmp(aconf->passwd, client_p->localClient->passwd) == 0) |
| 449 |
< |
server_conf = conf; |
| 450 |
< |
} |
| 451 |
< |
} |
| 425 |
> |
if (!match_conf_password(client_p->localClient->passwd, aconf)) |
| 426 |
> |
return -2; |
| 427 |
> |
|
| 428 |
> |
server_conf = conf; |
| 429 |
|
} |
| 430 |
|
} |
| 431 |
|
|
| 437 |
|
server_aconf = map_to_conf(server_conf); |
| 438 |
|
|
| 439 |
|
if (!IsConfTopicBurst(server_aconf)) |
| 463 |
– |
{ |
| 464 |
– |
ClearCap(client_p, CAP_TB); |
| 440 |
|
ClearCap(client_p, CAP_TBURST); |
| 466 |
– |
} |
| 441 |
|
|
| 442 |
|
if (aconf != NULL) |
| 443 |
|
{ |
| 644 |
|
|
| 645 |
|
if (IsConfAwayBurst((struct AccessItem *)map_to_conf(client_p->localClient->confs.head->data))) |
| 646 |
|
if (!EmptyString(target_p->away)) |
| 647 |
< |
sendto_one(client_p, ":%s AWAY :%s", target_p->name, |
| 647 |
> |
sendto_one(client_p, ":%s AWAY :%s", ID_or_name(target_p, client_p), |
| 648 |
|
target_p->away); |
| 649 |
|
|
| 650 |
|
} |
| 769 |
|
*/ |
| 770 |
|
|
| 771 |
|
send_capabilities(client_p, aconf, |
| 772 |
< |
(IsConfTopicBurst(aconf) ? CAP_TBURST|CAP_TB : 0)); |
| 772 |
> |
(IsConfTopicBurst(aconf) ? CAP_TBURST : 0)); |
| 773 |
|
|
| 774 |
|
sendto_one(client_p, "SERVER %s 1 :%s%s", |
| 775 |
|
me.name, ConfigServerHide.hidden ? "(H) " : "", me.info); |
| 988 |
|
burst_members(client_p, chptr); |
| 989 |
|
send_channel_modes(client_p, chptr); |
| 990 |
|
|
| 991 |
< |
if (IsCapable(client_p, CAP_TBURST) || |
| 1018 |
< |
IsCapable(client_p, CAP_TB)) |
| 991 |
> |
if (IsCapable(client_p, CAP_TBURST)) |
| 992 |
|
send_tb(client_p, chptr); |
| 993 |
|
} |
| 994 |
|
} |
| 1020 |
|
* - pointer to channel |
| 1021 |
|
* output - NONE |
| 1022 |
|
* side effects - Called on a server burst when |
| 1023 |
< |
* server is CAP_TB|CAP_TBURST capable |
| 1023 |
> |
* server is CAP_TBURST capable |
| 1024 |
|
*/ |
| 1025 |
|
static void |
| 1026 |
|
send_tb(struct Client *client_p, struct Channel *chptr) |
| 1039 |
|
* for further information -Michael |
| 1040 |
|
*/ |
| 1041 |
|
if (chptr->topic_time != 0) |
| 1042 |
< |
{ |
| 1043 |
< |
if (IsCapable(client_p, CAP_TBURST)) |
| 1044 |
< |
sendto_one(client_p, ":%s TBURST %lu %s %lu %s :%s", |
| 1045 |
< |
me.name, (unsigned long)chptr->channelts, chptr->chname, |
| 1046 |
< |
(unsigned long)chptr->topic_time, |
| 1047 |
< |
chptr->topic_info, |
| 1075 |
< |
chptr->topic); |
| 1076 |
< |
else if (IsCapable(client_p, CAP_TB)) |
| 1077 |
< |
sendto_one(client_p, ":%s TB %s %lu %s :%s", |
| 1078 |
< |
me.name, chptr->chname, |
| 1079 |
< |
(unsigned long)chptr->topic_time, |
| 1080 |
< |
chptr->topic_info, chptr->topic); |
| 1081 |
< |
} |
| 1042 |
> |
sendto_one(client_p, ":%s TBURST %lu %s %lu %s :%s", |
| 1043 |
> |
ID_or_name(&me, client_p), |
| 1044 |
> |
(unsigned long)chptr->channelts, chptr->chname, |
| 1045 |
> |
(unsigned long)chptr->topic_time, |
| 1046 |
> |
chptr->topic_info, |
| 1047 |
> |
chptr->topic); |
| 1048 |
|
} |
| 1049 |
|
|
| 1050 |
|
/* burst_members() |
| 1322 |
|
aconf->spasswd, TS_CURRENT, me.id); |
| 1323 |
|
|
| 1324 |
|
send_capabilities(client_p, aconf, |
| 1325 |
< |
(IsConfTopicBurst(aconf) ? CAP_TBURST|CAP_TB : 0)); |
| 1325 |
> |
(IsConfTopicBurst(aconf) ? CAP_TBURST : 0)); |
| 1326 |
|
|
| 1327 |
|
sendto_one(client_p, "SERVER %s 1 :%s%s", |
| 1328 |
|
me.name, ConfigServerHide.hidden ? "(H) " : "", |
| 1484 |
|
aconf->spasswd, TS_CURRENT, me.id); |
| 1485 |
|
|
| 1486 |
|
send_capabilities(client_p, aconf, |
| 1487 |
< |
(IsConfTopicBurst(aconf) ? CAP_TBURST|CAP_TB : 0)); |
| 1487 |
> |
(IsConfTopicBurst(aconf) ? CAP_TBURST : 0)); |
| 1488 |
|
|
| 1489 |
|
sendto_one(client_p, "SERVER %s 1 :%s%s", |
| 1490 |
|
me.name, ConfigServerHide.hidden ? "(H) " : "", |