summaryrefslogtreecommitdiff
path: root/modules/pseudoclients/hostserv.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'modules/pseudoclients/hostserv.cpp')
-rw-r--r--modules/pseudoclients/hostserv.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/modules/pseudoclients/hostserv.cpp b/modules/pseudoclients/hostserv.cpp
index 31b623895..2ac0d8f09 100644
--- a/modules/pseudoclients/hostserv.cpp
+++ b/modules/pseudoclients/hostserv.cpp
@@ -35,12 +35,15 @@ class HostServCore : public Module
HostServ = bi;
}
- void OnNickIdentify(User *u) anope_override
+ void OnUserLogin(User *u) anope_override
{
+ if (!IRCD->CanSetVHost)
+ return;
+
const NickAlias *na = NickAlias::Find(u->nick);
- if (!na || !na->HasVhost())
+ if (!na || na->nc != u->Account() || !na->HasVhost())
na = NickAlias::Find(u->Account()->display);
- if (!IRCD->CanSetVHost || !na || !na->HasVhost())
+ if (!na || !na->HasVhost())
return;
if (u->vhost.empty() || !u->vhost.equals_cs(na->GetVhostHost()) || (!na->GetVhostIdent().empty() && !u->GetVIdent().equals_cs(na->GetVhostIdent())))