From 1a8ae513b43d6f5ab5f83740c73d018eafb44d9a Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Mon, 4 Mar 2024 10:36:10 +0000 Subject: Add NickAlias::GetVhostMask for getting the vident@vhost. --- modules/webcpanel/pages/hostserv/request.cpp | 7 +------ modules/webcpanel/pages/nickserv/info.cpp | 7 +------ 2 files changed, 2 insertions(+), 12 deletions(-) (limited to 'modules/webcpanel') diff --git a/modules/webcpanel/pages/hostserv/request.cpp b/modules/webcpanel/pages/hostserv/request.cpp index 373686600..0a8513c76 100644 --- a/modules/webcpanel/pages/hostserv/request.cpp +++ b/modules/webcpanel/pages/hostserv/request.cpp @@ -22,12 +22,7 @@ bool WebCPanel::HostServ::Request::OnRequest(HTTPProvider *server, const Anope:: } if (na->HasVhost()) - { - if (!na->GetVhostIdent().empty()) - replacements["VHOST"] = na->GetVhostIdent() + "@" + na->GetVhostHost(); - else - replacements["VHOST"] = na->GetVhostHost(); - } + replacements["VHOST"] = na->GetVhostMask(); if (ServiceReference("Command", "hostserv/request")) replacements["CAN_REQUEST"] = "YES"; TemplateFileServer page("hostserv/request.html"); diff --git a/modules/webcpanel/pages/nickserv/info.cpp b/modules/webcpanel/pages/nickserv/info.cpp index 54b9c75c5..6a47e541c 100644 --- a/modules/webcpanel/pages/nickserv/info.cpp +++ b/modules/webcpanel/pages/nickserv/info.cpp @@ -81,12 +81,7 @@ bool WebCPanel::NickServ::Info::OnRequest(HTTPProvider *server, const Anope::str replacements["EMAIL"] = na->nc->email; replacements["TIME_REGISTERED"] = Anope::strftime(na->time_registered, na->nc); if (na->HasVhost()) - { - if (!na->GetVhostIdent().empty()) - replacements["VHOST"] = na->GetVhostIdent() + "@" + na->GetVhostHost(); - else - replacements["VHOST"] = na->GetVhostHost(); - } + replacements["VHOST"] = na->GetVhostMask(); Anope::string *greet = na->nc->GetExt("greet"); if (greet) replacements["GREET"] = *greet; -- cgit