core: no more TS5

This commit is contained in:
William Pitcock 2008-06-08 01:29:26 -05:00
parent 06a7954fa1
commit a4857d780f
2 changed files with 30 additions and 55 deletions

View File

@ -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, sendto_server(client_p, NULL, CAP_TS6, NOCAPS,
":%s QUIT :%s", use_id(source_p), comment); ":%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); 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, sendto_server(client_p, NULL, CAP_TS6, NOCAPS,
":%s QUIT :%s", use_id(source_p), comment); ":%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); SetDead(source_p);

View File

@ -582,6 +582,7 @@ introduce_client(struct Client *client_p, struct Client *source_p, struct User *
char *p; char *p;
hook_data_umode_changed hdata; hook_data_umode_changed hdata;
hook_data_client hdata2; hook_data_client hdata2;
char sockhost[HOSTLEN];
if(MyClient(source_p)) if(MyClient(source_p))
send_umode(source_p, source_p, 0, 0, ubuf); 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'; ubuf[1] = '\0';
} }
/* if it has an ID, introduce it with its id to TS6 servers, s_assert(has_id(source_p));
* otherwise introduce it normally to all.
*/ if(source_p->sockhost[0] == ':')
if(has_id(source_p))
{ {
char sockhost[HOSTLEN]; sockhost[0] = '0';
if(source_p->sockhost[0] == ':') sockhost[1] = '\0';
{ rb_strlcat(sockhost, source_p->sockhost, sizeof(sockhost));
sockhost[0] = '0'; } else
sockhost[1] = '\0'; strcpy(sockhost, source_p->sockhost);
rb_strlcat(sockhost, source_p->sockhost, sizeof(sockhost));
} else
strcpy(sockhost, source_p->sockhost);
if (use_euid) if (use_euid)
sendto_server(client_p, NULL, CAP_EUID | CAP_TS6, NOCAPS, sendto_server(client_p, NULL, CAP_EUID | CAP_TS6, NOCAPS,
":%s EUID %s %d %ld %s %s %s %s %s %s %s :%s", ":%s EUID %s %d %ld %s %s %s %s %s %s %s :%s",
source_p->servptr->id, nick, source_p->servptr->id, nick,
source_p->hopcount + 1, source_p->hopcount + 1,
(long) source_p->tsinfo, ubuf, (long) source_p->tsinfo, ubuf,
source_p->username, source_p->host, source_p->username, source_p->host,
IsIPSpoof(source_p) ? "0" : sockhost, IsIPSpoof(source_p) ? "0" : sockhost,
source_p->id, source_p->id,
IsDynSpoof(source_p) ? source_p->orighost : "*", IsDynSpoof(source_p) ? source_p->orighost : "*",
EmptyString(source_p->user->suser) ? "*" : source_p->user->suser, EmptyString(source_p->user->suser) ? "*" : source_p->user->suser,
source_p->info); source_p->info);
sendto_server(client_p, NULL, CAP_TS6, use_euid ? CAP_EUID : NOCAPS, sendto_server(client_p, NULL, CAP_TS6, use_euid ? CAP_EUID : NOCAPS,
":%s UID %s %d %ld %s %s %s %s %s :%s", ":%s UID %s %d %ld %s %s %s %s %s :%s",
source_p->servptr->id, nick, source_p->servptr->id, nick,
source_p->hopcount + 1, source_p->hopcount + 1,
(long) source_p->tsinfo, ubuf, (long) source_p->tsinfo, ubuf,
source_p->username, source_p->host, source_p->username, source_p->host,
IsIPSpoof(source_p) ? "0" : sockhost, IsIPSpoof(source_p) ? "0" : sockhost,
source_p->id, source_p->info); 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);
if (IsDynSpoof(source_p)) if (IsDynSpoof(source_p))
{ {
sendto_server(client_p, NULL, CAP_TS6, use_euid ? CAP_EUID : NOCAPS, ":%s ENCAP * REALHOST %s", sendto_server(client_p, NULL, CAP_TS6, use_euid ? CAP_EUID : NOCAPS, ":%s ENCAP * REALHOST %s",
use_id(source_p), source_p->orighost); 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)) if (!EmptyString(source_p->user->suser))
{ {
sendto_server(client_p, NULL, CAP_TS6, use_euid ? CAP_EUID : NOCAPS, ":%s ENCAP * LOGIN %s", sendto_server(client_p, NULL, CAP_TS6, use_euid ? CAP_EUID : NOCAPS, ":%s ENCAP * LOGIN %s",
use_id(source_p), source_p->user->suser); 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) if(MyConnect(source_p) && source_p->localClient->passwd)