diff options
-rw-r--r-- | modules/commands/hs_off.cpp | 3 | ||||
-rw-r--r-- | modules/commands/hs_on.cpp | 2 |
2 files changed, 5 insertions, 0 deletions
diff --git a/modules/commands/hs_off.cpp b/modules/commands/hs_off.cpp index 603b863c1..d0a64fb5b 100644 --- a/modules/commands/hs_off.cpp +++ b/modules/commands/hs_off.cpp @@ -23,7 +23,10 @@ class CommandHSOff : public Command void Execute(CommandSource &source, const std::vector<Anope::string> ¶ms) anope_override { User *u = source.GetUser(); + const NickAlias *na = NickAlias::Find(u->nick); + if (!na || na->nc != u->Account() || !na->HasVhost()) + na = NickAlias::Find(u->Account()->display); if (!na || !na->HasVhost()) source.Reply(HOST_NOT_ASSIGNED); diff --git a/modules/commands/hs_on.cpp b/modules/commands/hs_on.cpp index d59206e27..26fa6266f 100644 --- a/modules/commands/hs_on.cpp +++ b/modules/commands/hs_on.cpp @@ -27,6 +27,8 @@ class CommandHSOn : public Command User *u = source.GetUser(); const NickAlias *na = NickAlias::Find(u->nick); + if (!na || na->nc != u->Account() || !na->HasVhost()) + na = NickAlias::Find(u->Account()->display); if (na && u->Account() == na->nc && na->HasVhost()) { if (!na->GetVhostIdent().empty()) |