extensions/ip_cloaking*: Fix a bug accidentally introduced in 29d224a1 where the cloaking module would change your cloak locally, but not correctly broadcast this to the network, and fail to tell you correctly in the RPL_HOSTHIDDEN reply

This commit is contained in:
Douglas Freed 2012-05-24 11:06:20 +00:00
parent c46a4ecd97
commit 9f409b6333
4 changed files with 16 additions and 16 deletions

View file

@ -51,17 +51,17 @@ distribute_hostchange(struct Client *client_p, char *newhost)
{ {
if (newhost != client_p->orighost) if (newhost != client_p->orighost)
sendto_one_numeric(client_p, RPL_HOSTHIDDEN, "%s :is now your hidden host", sendto_one_numeric(client_p, RPL_HOSTHIDDEN, "%s :is now your hidden host",
client_p->host); newhost);
else else
sendto_one_numeric(client_p, RPL_HOSTHIDDEN, "%s :hostname reset", sendto_one_numeric(client_p, RPL_HOSTHIDDEN, "%s :hostname reset",
client_p->host); newhost);
sendto_server(NULL, NULL, sendto_server(NULL, NULL,
CAP_EUID | CAP_TS6, NOCAPS, ":%s CHGHOST %s :%s", CAP_EUID | CAP_TS6, NOCAPS, ":%s CHGHOST %s :%s",
use_id(&me), use_id(client_p), client_p->host); use_id(&me), use_id(client_p), newhost);
sendto_server(NULL, NULL, sendto_server(NULL, NULL,
CAP_TS6, CAP_EUID, ":%s ENCAP * CHGHOST %s :%s", CAP_TS6, CAP_EUID, ":%s ENCAP * CHGHOST %s :%s",
use_id(&me), use_id(client_p), client_p->host); use_id(&me), use_id(client_p), newhost);
change_nick_user_host(client_p, client_p->name, client_p->username, newhost, 0, "Changing host"); change_nick_user_host(client_p, client_p->name, client_p->username, newhost, 0, "Changing host");

View file

@ -48,17 +48,17 @@ distribute_hostchange(struct Client *client_p, char *newhost)
{ {
if (newhost != client_p->orighost) if (newhost != client_p->orighost)
sendto_one_numeric(client_p, RPL_HOSTHIDDEN, "%s :is now your hidden host", sendto_one_numeric(client_p, RPL_HOSTHIDDEN, "%s :is now your hidden host",
client_p->host); newhost);
else else
sendto_one_numeric(client_p, RPL_HOSTHIDDEN, "%s :hostname reset", sendto_one_numeric(client_p, RPL_HOSTHIDDEN, "%s :hostname reset",
client_p->host); newhost);
sendto_server(NULL, NULL, sendto_server(NULL, NULL,
CAP_EUID | CAP_TS6, NOCAPS, ":%s CHGHOST %s :%s", CAP_EUID | CAP_TS6, NOCAPS, ":%s CHGHOST %s :%s",
use_id(&me), use_id(client_p), client_p->host); use_id(&me), use_id(client_p), newhost);
sendto_server(NULL, NULL, sendto_server(NULL, NULL,
CAP_TS6, CAP_EUID, ":%s ENCAP * CHGHOST %s :%s", CAP_TS6, CAP_EUID, ":%s ENCAP * CHGHOST %s :%s",
use_id(&me), use_id(client_p), client_p->host); use_id(&me), use_id(client_p), newhost);
change_nick_user_host(client_p, client_p->name, client_p->username, newhost, 0, "Changing host"); change_nick_user_host(client_p, client_p->name, client_p->username, newhost, 0, "Changing host");

View file

@ -51,17 +51,17 @@ distribute_hostchange(struct Client *client_p, char *newhost)
{ {
if (newhost != client_p->orighost) if (newhost != client_p->orighost)
sendto_one_numeric(client_p, RPL_HOSTHIDDEN, "%s :is now your hidden host", sendto_one_numeric(client_p, RPL_HOSTHIDDEN, "%s :is now your hidden host",
client_p->host); newhost);
else else
sendto_one_numeric(client_p, RPL_HOSTHIDDEN, "%s :hostname reset", sendto_one_numeric(client_p, RPL_HOSTHIDDEN, "%s :hostname reset",
client_p->host); newhost);
sendto_server(NULL, NULL, sendto_server(NULL, NULL,
CAP_EUID | CAP_TS6, NOCAPS, ":%s CHGHOST %s :%s", CAP_EUID | CAP_TS6, NOCAPS, ":%s CHGHOST %s :%s",
use_id(&me), use_id(client_p), client_p->host); use_id(&me), use_id(client_p), newhost);
sendto_server(NULL, NULL, sendto_server(NULL, NULL,
CAP_TS6, CAP_EUID, ":%s ENCAP * CHGHOST %s :%s", CAP_TS6, CAP_EUID, ":%s ENCAP * CHGHOST %s :%s",
use_id(&me), use_id(client_p), client_p->host); use_id(&me), use_id(client_p), newhost);
change_nick_user_host(client_p, client_p->name, client_p->username, newhost, 0, "Changing host"); change_nick_user_host(client_p, client_p->name, client_p->username, newhost, 0, "Changing host");

View file

@ -48,17 +48,17 @@ distribute_hostchange(struct Client *client_p, char *newhost)
{ {
if (newhost != client_p->orighost) if (newhost != client_p->orighost)
sendto_one_numeric(client_p, RPL_HOSTHIDDEN, "%s :is now your hidden host", sendto_one_numeric(client_p, RPL_HOSTHIDDEN, "%s :is now your hidden host",
client_p->host); newhost);
else else
sendto_one_numeric(client_p, RPL_HOSTHIDDEN, "%s :hostname reset", sendto_one_numeric(client_p, RPL_HOSTHIDDEN, "%s :hostname reset",
client_p->host); newhost);
sendto_server(NULL, NULL, sendto_server(NULL, NULL,
CAP_EUID | CAP_TS6, NOCAPS, ":%s CHGHOST %s :%s", CAP_EUID | CAP_TS6, NOCAPS, ":%s CHGHOST %s :%s",
use_id(&me), use_id(client_p), client_p->host); use_id(&me), use_id(client_p), newhost);
sendto_server(NULL, NULL, sendto_server(NULL, NULL,
CAP_TS6, CAP_EUID, ":%s ENCAP * CHGHOST %s :%s", CAP_TS6, CAP_EUID, ":%s ENCAP * CHGHOST %s :%s",
use_id(&me), use_id(client_p), client_p->host); use_id(&me), use_id(client_p), newhost);
change_nick_user_host(client_p, client_p->name, client_p->username, newhost, 0, "Changing host"); change_nick_user_host(client_p, client_p->name, client_p->username, newhost, 0, "Changing host");