diff --git a/Changes b/Changes index 4055f61a2..4904bfdc1 100644 --- a/Changes +++ b/Changes @@ -1,4 +1,4 @@ -/* + * UnrealIRCd Changes File - (C) Carsten Munk 1999-2002 & * The UnrealIRCd Team * @@ -1446,3 +1446,4 @@ seen. gmtime warning still there include/stamp.h, src/buildm4, src/chkconf.c, src/conftool.c - Removed doc/Etiquette - Compile error fix regarding version.h +- Made +x send out a SETHOST to VHP servers, requested by PreZ@DarkerNet diff --git a/include/struct.h b/include/struct.h index 7097ec28c..bafaeb83f 100644 --- a/include/struct.h +++ b/include/struct.h @@ -246,6 +246,8 @@ typedef unsigned int u_int32_t; /* XXX Hope this works! */ #define OPT_NOT_SJ3 0x0200 #define OPT_SJB64 0x0400 #define OPT_NOT_SJB64 0x0800 +#define OPT_VHP 0x1000 +#define OPT_NOT_VHP 0x2000 #define FLAGS_PINGSENT 0x0001 /* Unreplied ping sent */ #define FLAGS_DEADSOCKET 0x0002 /* Local socket is dead--Exiting soon */ diff --git a/src/s_user.c b/src/s_user.c index 42553a69e..4dfd22427 100644 --- a/src/s_user.c +++ b/src/s_user.c @@ -2355,6 +2355,8 @@ CMD_FUNC(m_umode) } sptr->user->virthost = (char *)make_virthost(sptr->user->realhost, sptr->user->virthost, 1); + sendto_serv_butone_token_opt(cptr, OPT_VHP, sptr->name, + MSG_SETHOST, TOK_SETHOST, "%s", sptr->user->virthost); } if (!IsHidden(sptr) && (setflags & UMODE_HIDE)) { diff --git a/src/send.c b/src/send.c index 4eca63ef6..431929680 100644 --- a/src/send.c +++ b/src/send.c @@ -793,6 +793,10 @@ void sendto_serv_butone_token_opt(aClient *one, int opt, char *prefix, char *com continue; if ((opt & OPT_NOT_SJB64) && (cptr->proto & PROTO_SJB64)) continue; + if ((opt & OPT_VHP) && !(cptr->proto & PROTO_VHP)) + continue; + if ((opt & OPT_NOT_VHP) && (cptr->proto & PROTO_VHP)) + continue; if (IsToken(cptr)) {