summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/hostserv/off.cpp3
-rw-r--r--modules/hostserv/on.cpp3
2 files changed, 6 insertions, 0 deletions
diff --git a/modules/hostserv/off.cpp b/modules/hostserv/off.cpp
index 0d743c28a..e8c191164 100644
--- a/modules/hostserv/off.cpp
+++ b/modules/hostserv/off.cpp
@@ -33,6 +33,9 @@ class CommandHSOff : public Command
User *u = source.GetUser();
NickServ::Nick *na = NickServ::FindNick(u->nick);
+ if (!na || na->GetAccount() != u->Account() || !na->HasVhost())
+ na = NickServ::FindNick(u->Account()->GetDisplay());
+
if (!na || !na->HasVhost() || na->GetAccount() != source.GetAccount())
{
source.Reply(_("There is no vhost assigned to this nickname."));
diff --git a/modules/hostserv/on.cpp b/modules/hostserv/on.cpp
index 511436e1e..1332c7e7a 100644
--- a/modules/hostserv/on.cpp
+++ b/modules/hostserv/on.cpp
@@ -36,6 +36,9 @@ class CommandHSOn : public Command
User *u = source.GetUser();
NickServ::Nick *na = NickServ::FindNick(u->nick);
+ if (!na || na->GetAccount() != u->Account() || !na->HasVhost())
+ na = NickServ::FindNick(u->Account()->GetDisplay());
+
if (!na || !na->HasVhost() || na->GetAccount() != u->Account())
{
source.Reply(_("There is no vhost assigned to this nickname."));