summaryrefslogtreecommitdiff
path: root/modules/webcpanel/pages/hostserv/request.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2016-10-09 12:00:15 -0400
committerAdam <Adam@anope.org>2016-10-09 12:00:15 -0400
commit5fd2d0ee3e136e01926f21edc759a4ab9fd48806 (patch)
tree6666be3d14db12fe66a3576e889423f64e5229cc /modules/webcpanel/pages/hostserv/request.cpp
parentcffbf4e8fd93ae28f1c6d6fde221e72d70015942 (diff)
Split vhosts into its own structure
Diffstat (limited to 'modules/webcpanel/pages/hostserv/request.cpp')
-rw-r--r--modules/webcpanel/pages/hostserv/request.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/modules/webcpanel/pages/hostserv/request.cpp b/modules/webcpanel/pages/hostserv/request.cpp
index 0230ba8fa..dc782361c 100644
--- a/modules/webcpanel/pages/hostserv/request.cpp
+++ b/modules/webcpanel/pages/hostserv/request.cpp
@@ -33,12 +33,13 @@ bool WebCPanel::HostServ::Request::OnRequest(HTTPProvider *server, const Anope::
WebPanel::RunCommand(na->GetAccount()->GetDisplay(), na->GetAccount(), "HostServ", "hostserv/request", params, replacements, "CMDR");
}
- if (na->HasVhost())
+ ::HostServ::VHost *vhost = na->GetVHost();
+ if (vhost != nullptr)
{
- if (na->GetVhostIdent().empty() == false)
- replacements["VHOST"] = na->GetVhostIdent() + "@" + na->GetVhostHost();
+ if (vhost->GetIdent().empty() == false)
+ replacements["VHOST"] = vhost->GetIdent() + "@" + vhost->GetHost();
else
- replacements["VHOST"] = na->GetVhostHost();
+ replacements["VHOST"] = vhost->GetHost();
}
if (ServiceReference<Command>("hostserv/request"))
replacements["CAN_REQUEST"] = "YES";