core: no more TS5
This commit is contained in:
parent
169c767d3d
commit
ca273a1c73
2 changed files with 30 additions and 55 deletions
|
@ -1302,8 +1302,6 @@ exit_remote_client(struct Client *client_p, struct Client *source_p, struct Clie
|
|||
{
|
||||
sendto_server(client_p, NULL, CAP_TS6, NOCAPS,
|
||||
":%s QUIT :%s", use_id(source_p), comment);
|
||||
sendto_server(client_p, NULL, NOCAPS, CAP_TS6,
|
||||
":%s QUIT :%s", source_p->name, comment);
|
||||
}
|
||||
|
||||
SetDead(source_p);
|
||||
|
@ -1550,8 +1548,6 @@ exit_local_client(struct Client *client_p, struct Client *source_p, struct Clien
|
|||
{
|
||||
sendto_server(client_p, NULL, CAP_TS6, NOCAPS,
|
||||
":%s QUIT :%s", use_id(source_p), comment);
|
||||
sendto_server(client_p, NULL, NOCAPS, CAP_TS6,
|
||||
":%s QUIT :%s", source_p->name, comment);
|
||||
}
|
||||
|
||||
SetDead(source_p);
|
||||
|
|
81
src/s_user.c
81
src/s_user.c
|
@ -582,6 +582,7 @@ introduce_client(struct Client *client_p, struct Client *source_p, struct User *
|
|||
char *p;
|
||||
hook_data_umode_changed hdata;
|
||||
hook_data_client hdata2;
|
||||
char sockhost[HOSTLEN];
|
||||
|
||||
if(MyClient(source_p))
|
||||
send_umode(source_p, source_p, 0, 0, ubuf);
|
||||
|
@ -594,70 +595,48 @@ introduce_client(struct Client *client_p, struct Client *source_p, struct User *
|
|||
ubuf[1] = '\0';
|
||||
}
|
||||
|
||||
/* if it has an ID, introduce it with its id to TS6 servers,
|
||||
* otherwise introduce it normally to all.
|
||||
*/
|
||||
if(has_id(source_p))
|
||||
s_assert(has_id(source_p));
|
||||
|
||||
if(source_p->sockhost[0] == ':')
|
||||
{
|
||||
char sockhost[HOSTLEN];
|
||||
if(source_p->sockhost[0] == ':')
|
||||
{
|
||||
sockhost[0] = '0';
|
||||
sockhost[1] = '\0';
|
||||
rb_strlcat(sockhost, source_p->sockhost, sizeof(sockhost));
|
||||
} else
|
||||
strcpy(sockhost, source_p->sockhost);
|
||||
sockhost[0] = '0';
|
||||
sockhost[1] = '\0';
|
||||
rb_strlcat(sockhost, source_p->sockhost, sizeof(sockhost));
|
||||
} else
|
||||
strcpy(sockhost, source_p->sockhost);
|
||||
|
||||
if (use_euid)
|
||||
sendto_server(client_p, NULL, CAP_EUID | CAP_TS6, NOCAPS,
|
||||
":%s EUID %s %d %ld %s %s %s %s %s %s %s :%s",
|
||||
source_p->servptr->id, nick,
|
||||
source_p->hopcount + 1,
|
||||
(long) source_p->tsinfo, ubuf,
|
||||
source_p->username, source_p->host,
|
||||
IsIPSpoof(source_p) ? "0" : sockhost,
|
||||
source_p->id,
|
||||
IsDynSpoof(source_p) ? source_p->orighost : "*",
|
||||
EmptyString(source_p->user->suser) ? "*" : source_p->user->suser,
|
||||
source_p->info);
|
||||
if (use_euid)
|
||||
sendto_server(client_p, NULL, CAP_EUID | CAP_TS6, NOCAPS,
|
||||
":%s EUID %s %d %ld %s %s %s %s %s %s %s :%s",
|
||||
source_p->servptr->id, nick,
|
||||
source_p->hopcount + 1,
|
||||
(long) source_p->tsinfo, ubuf,
|
||||
source_p->username, source_p->host,
|
||||
IsIPSpoof(source_p) ? "0" : sockhost,
|
||||
source_p->id,
|
||||
IsDynSpoof(source_p) ? source_p->orighost : "*",
|
||||
EmptyString(source_p->user->suser) ? "*" : source_p->user->suser,
|
||||
source_p->info);
|
||||
|
||||
sendto_server(client_p, NULL, CAP_TS6, use_euid ? CAP_EUID : NOCAPS,
|
||||
":%s UID %s %d %ld %s %s %s %s %s :%s",
|
||||
source_p->servptr->id, nick,
|
||||
source_p->hopcount + 1,
|
||||
(long) source_p->tsinfo, ubuf,
|
||||
source_p->username, source_p->host,
|
||||
IsIPSpoof(source_p) ? "0" : sockhost,
|
||||
source_p->id, source_p->info);
|
||||
|
||||
sendto_server(client_p, NULL, NOCAPS, CAP_TS6,
|
||||
"NICK %s %d %ld %s %s %s %s :%s",
|
||||
nick, source_p->hopcount + 1,
|
||||
(long) source_p->tsinfo,
|
||||
ubuf, source_p->username, source_p->host,
|
||||
source_p->servptr->name, source_p->info);
|
||||
}
|
||||
else
|
||||
sendto_server(client_p, NULL, NOCAPS, NOCAPS,
|
||||
"NICK %s %d %ld %s %s %s %s :%s",
|
||||
nick, source_p->hopcount + 1,
|
||||
(long) source_p->tsinfo,
|
||||
ubuf, source_p->username, source_p->host,
|
||||
source_p->servptr->name, source_p->info);
|
||||
sendto_server(client_p, NULL, CAP_TS6, use_euid ? CAP_EUID : NOCAPS,
|
||||
":%s UID %s %d %ld %s %s %s %s %s :%s",
|
||||
source_p->servptr->id, nick,
|
||||
source_p->hopcount + 1,
|
||||
(long) source_p->tsinfo, ubuf,
|
||||
source_p->username, source_p->host,
|
||||
IsIPSpoof(source_p) ? "0" : sockhost,
|
||||
source_p->id, source_p->info);
|
||||
|
||||
if (IsDynSpoof(source_p))
|
||||
{
|
||||
sendto_server(client_p, NULL, CAP_TS6, use_euid ? CAP_EUID : NOCAPS, ":%s ENCAP * REALHOST %s",
|
||||
use_id(source_p), source_p->orighost);
|
||||
sendto_server(client_p, NULL, NOCAPS, CAP_TS6, ":%s ENCAP * REALHOST %s",
|
||||
source_p->name, source_p->orighost);
|
||||
}
|
||||
|
||||
if (!EmptyString(source_p->user->suser))
|
||||
{
|
||||
sendto_server(client_p, NULL, CAP_TS6, use_euid ? CAP_EUID : NOCAPS, ":%s ENCAP * LOGIN %s",
|
||||
use_id(source_p), source_p->user->suser);
|
||||
sendto_server(client_p, NULL, NOCAPS, CAP_TS6, ":%s ENCAP * LOGIN %s",
|
||||
source_p->name, source_p->user->suser);
|
||||
}
|
||||
|
||||
if(MyConnect(source_p) && source_p->localClient->passwd)
|
||||
|
|
Loading…
Reference in a new issue