1
0
mirror of https://github.com/anope/anope.git synced 2026-06-12 19:14:47 +02:00

Use the remaining wait time in the registration delay message.

Closes #452.
This commit is contained in:
Sadie Powell
2024-11-13 11:52:12 +00:00
parent 4de59d61d8
commit 309c342b86
2 changed files with 7 additions and 6 deletions
+4 -4
View File
@@ -7081,10 +7081,6 @@ msgstr ""
msgid "You must confirm your account before you may send a memo."
msgstr ""
#, c-format
msgid "You must have been using this nick for at least %lu seconds to register."
msgstr ""
#, c-format
msgid "You must have the %s(ME) privilege on the channel to use this command."
msgstr ""
@@ -7095,6 +7091,10 @@ msgid ""
"case you forget it."
msgstr ""
#, c-format
msgid "You must wait %s before registering your nick."
msgstr ""
msgid "You need to be identified to use this command."
msgstr ""
+3 -2
View File
@@ -154,8 +154,9 @@ public:
time_t reg_delay = Config->GetModule("nickserv")->Get<time_t>("regdelay");
if (u && !u->HasMode("OPER") && nickregdelay && Anope::CurTime - u->timestamp < nickregdelay)
{
source.Reply(_("You must have been using this nick for at least %lu seconds to register."),
(unsigned long)nickregdelay);
auto waitperiod = (u->timestamp + nickregdelay) - Anope::CurTime;
source.Reply(_("You must wait %s before registering your nick."),
Anope::Duration(waitperiod, source.GetAccount()).c_str());
return;
}