--- /dev/null
+Check if new spoof user@host is not already set, but only when user already has +h or is +rx (and not just +r)
+
+diff -r be4b66b8edbf ircd/m_sethost.c
+--- a/ircd/m_sethost.c
++++ b/ircd/m_sethost.c
+@@ -136,7 +136,7 @@
+ send_reply(sptr, ERR_BADHOSTMASK, hostmask);
+ return 0;
+ }
+- if (IsSetHost(sptr) || IsAccount(sptr)) {
++ if (IsSetHost(sptr) || HasHiddenHost(sptr)) {
+ ircd_snprintf(0, curhostmask, USERLEN + HOSTLEN + 2, "%s@%s", sptr->cli_user->username, sptr->cli_user->host);
+ if (0 == strcmp(hostmask, curhostmask)) {
+ send_reply(sptr, RPL_HOSTHIDDEN, curhostmask);
+@@ -150,7 +150,7 @@
+ send_reply(sptr, ERR_BADHOSTMASK, parv[1]);
+ return 0;
+ }
+- if (IsSetHost(sptr) || IsAccount(sptr)) {
++ if (IsSetHost(sptr) || HasHiddenHost(sptr)) {
+ if (0 == strcmp(parv[1], sptr->cli_user->host)) {
+ send_reply(sptr, RPL_HOSTHIDDEN, parv[1]);
+ return 0;
+@@ -206,7 +206,7 @@
+ setflags = cli_flags(target);
+ FlagClr(&setflags, FLAG_SETHOST);
+
+- if (IsSetHost(target) || IsAccount(target)) {
++ if (IsSetHost(target) || HasHiddenHost(target)) {
+ if ((0 == strcmp(parv[2], target->cli_user->username)) && (0 == strcmp(parv[3], target->cli_user->host)))
+ return 0;
+ }