summaryrefslogtreecommitdiff
path: root/modules/hostserv/off.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'modules/hostserv/off.cpp')
-rw-r--r--modules/hostserv/off.cpp8
1 files changed, 1 insertions, 7 deletions
diff --git a/modules/hostserv/off.cpp b/modules/hostserv/off.cpp
index 95c27532a..1d7d91876 100644
--- a/modules/hostserv/off.cpp
+++ b/modules/hostserv/off.cpp
@@ -31,14 +31,8 @@ class CommandHSOff : public Command
void Execute(CommandSource &source, const std::vector<Anope::string> &params) override
{
User *u = source.GetUser();
- NickServ::Nick *na = NickServ::FindNick(u->nick);
- HostServ::VHost *vhost = nullptr;
- if (na && na->GetAccount() == source.GetAccount())
- vhost = na->GetVHost();
-
- if (vhost == nullptr)
- vhost = NickServ::FindNick(u->Account()->GetDisplay())->GetVHost();
+ HostServ::VHost *vhost = HostServ::FindVHost(u->Account());
if (vhost == nullptr)
{