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

Use a duration string when telling people to wait before emailing.

This commit is contained in:
Sadie Powell
2025-04-16 03:00:52 +01:00
parent 94c20f3084
commit fa7ed12aad
2 changed files with 7 additions and 4 deletions
+3 -3
View File
@@ -7,8 +7,8 @@ msgid ""
msgstr ""
"Project-Id-Version: Anope\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-04-16 02:51+0100\n"
"PO-Revision-Date: 2025-04-10 13:32+0100\n"
"POT-Creation-Date: 2025-04-16 02:59+0100\n"
"PO-Revision-Date: 2025-04-16 02:59+0100\n"
"Last-Translator: Sadie Powell <sadie@witchery.services>\n"
"Language-Team: English\n"
"Language: en_US\n"
@@ -3997,7 +3997,7 @@ msgid "Please use the symbol of # when attempting to register."
msgstr ""
#, c-format
msgid "Please wait %lu seconds and retry."
msgid "Please wait %s and retry."
msgstr ""
#, c-format
+4 -1
View File
@@ -93,7 +93,10 @@ bool Mail::Send(User *u, NickCore *nc, BotInfo *service, const Anope::string &su
if (!b.Get<bool>("usemail") || b.Get<const Anope::string>("sendfrom").empty())
u->SendMessage(service, _("Services have been configured to not send mail."));
else if (Anope::CurTime - u->lastmail < b.Get<time_t>("delay"))
u->SendMessage(service, _("Please wait \002%lu\002 seconds and retry."), (unsigned long)b.Get<time_t>("delay") - (Anope::CurTime - u->lastmail));
{
const auto delay = b.Get<time_t>("delay") - (Anope::CurTime - u->lastmail);
u->SendMessage(service, _("Please wait \002%s\002 and retry."), Anope::Duration(delay, u->Account()).c_str());
}
else if (nc->email.empty())
u->SendMessage(service, _("Email for \002%s\002 is invalid."), nc->display.c_str());
else