summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/core/hs_on.c4
-rw-r--r--src/hostserv.c5
2 files changed, 8 insertions, 1 deletions
diff --git a/src/core/hs_on.c b/src/core/hs_on.c
index 5d102273c..bbae6f73e 100644
--- a/src/core/hs_on.c
+++ b/src/core/hs_on.c
@@ -39,7 +39,11 @@ class CommandHSOn : public Command
notice_lang(s_HostServ, u, HOST_ACTIVATED, vHost);
ircdproto->SendVhost(u->nick, vIdent, vHost);
if (ircd->vhost)
+ {
+ if (u->vhost)
+ delete [] u->vhost;
u->vhost = sstrdup(vHost);
+ }
if (ircd->vident)
{
if (vIdent)
diff --git a/src/hostserv.c b/src/hostserv.c
index e3b3eac6f..a385bc14f 100644
--- a/src/hostserv.c
+++ b/src/hostserv.c
@@ -501,7 +501,10 @@ int do_on_id(User * u)
notice_lang(s_HostServ, u, HOST_ACTIVATED, vHost);
}
ircdproto->SendVhost(u->nick, vIdent, vHost);
- if (ircd->vhost) {
+ if (ircd->vhost)
+ {
+ if (u->vhost)
+ delete [] u->vhost;
u->vhost = sstrdup(vHost);
}
if (ircd->vident) {