summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSadie Powell <sadie@witchery.services>2025-04-16 03:00:52 +0100
committerSadie Powell <sadie@witchery.services>2025-04-16 03:00:52 +0100
commitfa7ed12aad28d6bd1b3d1b0190a3bccae1e1c832 (patch)
tree37bc38d01ab54919ff016861b390f222fef9abda /src
parent94c20f30846a4b49fff8182fcdeb565806f60ff0 (diff)
Use a duration string when telling people to wait before emailing.
Diffstat (limited to 'src')
-rw-r--r--src/mail.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mail.cpp b/src/mail.cpp
index 3aa15c99f..cb2b53bbe 100644
--- a/src/mail.cpp
+++ b/src/mail.cpp
@@ -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