summaryrefslogtreecommitdiff
path: root/modules/commands/hs_off.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2015-12-13 19:14:44 -0500
committerAdam <Adam@anope.org>2015-12-13 19:14:44 -0500
commit16d08e57df9cc5909b3477e51fac7baa7f312aff (patch)
treef8e2777e4c367aea257de2243696b3cb030f82e0 /modules/commands/hs_off.cpp
parent252a65af7e63e7da7d4984f45aef49edbfbac2bd (diff)
Fall back to account vhost in hs on/off
Diffstat (limited to 'modules/commands/hs_off.cpp')
-rw-r--r--modules/commands/hs_off.cpp3
1 files changed, 3 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> &params) 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);