summaryrefslogtreecommitdiff
path: root/modules/hostserv/off.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2016-10-09 19:51:39 -0400
committerAdam <Adam@anope.org>2016-10-09 19:51:39 -0400
commite7dd7159b1e1ab5b3edabc44ece5338672f8fbb4 (patch)
tree9517f02ca1c29fa247f6914398f35a44052c22ff /modules/hostserv/off.cpp
parent8ceca4fd3f9cb82bc93801d5eb682d27b2ad2f54 (diff)
Make vhosts assignable to accounts, not nicks. Allow multiple vhosts per account.
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)
{