diff options
Diffstat (limited to 'modules/webcpanel')
| -rw-r--r-- | modules/webcpanel/pages/hostserv/request.cpp | 9 | ||||
| -rw-r--r-- | modules/webcpanel/pages/nickserv/info.cpp | 11 |
2 files changed, 12 insertions, 8 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"; diff --git a/modules/webcpanel/pages/nickserv/info.cpp b/modules/webcpanel/pages/nickserv/info.cpp index f3c353044..7b0f5d64f 100644 --- a/modules/webcpanel/pages/nickserv/info.cpp +++ b/modules/webcpanel/pages/nickserv/info.cpp @@ -100,13 +100,16 @@ bool WebCPanel::NickServ::Info::OnRequest(HTTPProvider *server, const Anope::str if (na->GetAccount()->GetEmail().empty() == false) replacements["EMAIL"] = HTTPUtils::Escape(na->GetAccount()->GetEmail()); replacements["TIME_REGISTERED"] = Anope::strftime(na->GetTimeRegistered(), na->GetAccount()); - 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(); } + Anope::string *greet = na->GetAccount()->GetExt<Anope::string>("greet"); if (greet) replacements["GREET"] = HTTPUtils::Escape(*greet); |
