summaryrefslogtreecommitdiff
path: root/src/protocol/inspircd11.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/protocol/inspircd11.c')
-rw-r--r--src/protocol/inspircd11.c21
1 files changed, 17 insertions, 4 deletions
diff --git a/src/protocol/inspircd11.c b/src/protocol/inspircd11.c
index 7d3d2f287..977f05f1e 100644
--- a/src/protocol/inspircd11.c
+++ b/src/protocol/inspircd11.c
@@ -469,7 +469,21 @@ class InspIRCdProto : public IRCDProto
}
break;
case 'x':
- if (add) user->chost = user->vhost;
+ if (add && user->vhost)
+ {
+ /* If +x is recieved then User::vhost IS the cloaked host,
+ * set the cloaked host correctly and destroy the vhost - Adam
+ */
+ user->SetCloakedHost(user->vhost);
+ delete [] user->vhost;
+ user->vhost = NULL;
+ }
+ else
+ {
+ if (user->vhost)
+ delete [] user->vhost;
+ user->vhost = NULL;
+ }
update_host(user);
}
}
@@ -489,8 +503,7 @@ class InspIRCdProto : public IRCDProto
void SendVhostDel(User *u)
{
- inspircd_cmd_chghost(u->nick, (u->mode & umodes[static_cast<int>('x')] ? u->chost.c_str() : u->host));
- notice_lang(s_HostServ, u, HOST_OFF);
+ inspircd_cmd_chghost(u->nick, (u->mode & umodes[static_cast<int>('x')] ? u->GetCloakedHost().c_str() : u->host));
if (has_chgidentmod && u->GetIdent() != u->GetVIdent())
{
@@ -1102,7 +1115,7 @@ int anope_event_nick(const char *source, int ac, const char **av)
user->CheckAuthenticationToken(av[0]);
ircdproto->ProcessUsermodes(user, 1, &av[5]);
- user->chost = av[3];
+ user->SetCloakedHost(av[3]);
}
}
} else {