1
0
mirror of https://github.com/anope/anope.git synced 2026-07-07 02:23:12 +02:00

Fix confirming usernames using the webcpanel.

This commit is contained in:
Sadie Powell
2026-01-08 14:30:08 +00:00
parent 81aa37543e
commit 5dbbac21ec
+9 -4
View File
@@ -20,11 +20,16 @@ WebCPanel::NickServ::Confirm::Confirm(const Anope::string &cat, const Anope::str
bool WebCPanel::NickServ::Confirm::OnRequest(HTTP::Provider *server, const Anope::string &page_name, HTTP::Client *client, HTTP::Message &message, HTTP::Reply &reply, NickAlias *na, TemplateFileServer::Replacements &replacements)
{
const auto code = message.post_data["code"].trim();
if (code.empty())
replacements["MESSAGES"] = "You must specify a confirmation code";
else
{
std::vector<Anope::string> params;
params.push_back(code);
std::vector<Anope::string> params;
params.push_back(message.post_data["code"]);
WebPanel::RunCommand(client, na->nc->display, na->nc, "NickServ", "nickserv/confirm", params, replacements);
WebPanel::RunCommand(client, na->nc->display, na->nc, "NickServ", "nickserv/confirm/register", params, replacements);
}
TemplateFileServer page("nickserv/confirm.html");