diff options
| author | Adam <Adam@anope.org> | 2016-09-23 21:13:55 -0400 |
|---|---|---|
| committer | Adam <Adam@anope.org> | 2016-09-23 21:15:20 -0400 |
| commit | e4b63fddff00cdce1f277fbe2c36ac0ac2032d33 (patch) | |
| tree | e2d37c7f95a2d8d64d408efff453a5daab85ccb9 /modules | |
| parent | 51135c20bcc70fa98f4451c766cc57776b2f51d7 (diff) | |
Fall back to account vhost in hostserv/on and off
Diffstat (limited to 'modules')
| -rw-r--r-- | modules/hostserv/off.cpp | 3 | ||||
| -rw-r--r-- | modules/hostserv/on.cpp | 3 |
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.")); |
