1
0
mirror of https://github.com/anope/anope.git synced 2026-06-12 17:24:49 +02:00

Fix confirming accounts when admin-only confirmation is enabled.

This commit is contained in:
Sadie Powell
2026-05-14 09:45:59 +01:00
parent c1cf7b0bcc
commit e0da3bae18
2 changed files with 23 additions and 8 deletions
+7 -2
View File
@@ -16,8 +16,8 @@ msgid ""
msgstr ""
"Project-Id-Version: Anope\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2026-04-26 18:25+0100\n"
"PO-Revision-Date: 2026-04-26 18:25+0100\n"
"POT-Creation-Date: 2026-05-14 09:44+0100\n"
"PO-Revision-Date: 2026-05-14 09:44+0100\n"
"Last-Translator: Sadie Powell <sadie@sadiepowell.dev>\n"
"Language-Team: English\n"
"Language: en_US\n"
@@ -7234,6 +7234,11 @@ msgstr ""
msgid "The registration confirmation code you specified for %s is incorrect."
msgstr ""
#: ../modules/nickserv/ns_register.cpp
#, c-format
msgid "The registration of %s can only be confirmed by an administrator."
msgstr ""
#: ../modules/nickserv/ns_info.cpp
#, c-format
msgid "The services access status of %s will now be hidden from %s INFO displays."
+13 -3
View File
@@ -275,19 +275,29 @@ public:
return;
}
auto *passcode = nc->GetExt<Anope::string>("passcode");
if (!passcode)
if (!nc->HasExt("UNCONFIRMED"))
{
source.Reply(_("There is no registration confirmation pending for %s."),
na->nick.c_str());
return;
}
if (!code.empty() && !code.equals_cs(*passcode))
if (!code.empty())
{
auto *passcode = nc->GetExt<Anope::string>("passcode");
if (passcode && !code.equals_cs(*passcode))
{
source.Reply(_("The registration confirmation code you specified for %s is incorrect."),
na->nick.c_str());
return;
}
else if (!passcode)
{
source.Reply(_("The registration of %s can only be confirmed by an administrator."),
na->nick.c_str());
return;
}
}
nc->Shrink<Anope::string>("passcode");
nc->Shrink<bool>("UNCONFIRMED");