mirror of
https://github.com/anope/anope.git
synced 2026-07-10 19:43:14 +02:00
Added an Anope::string::is_pos_number_only function to use everywhere we convertTo unsigned values, and
fixed the mail delay error message to give the correct time.
This commit is contained in:
+2
-2
@@ -40,7 +40,7 @@ bool Mail(User *u, NickRequest *nr, const Anope::string &service, const Anope::s
|
||||
if (!Config->UseMail)
|
||||
notice_lang(service, u, MAIL_DISABLED);
|
||||
else if (t - u->lastmail < Config->MailDelay)
|
||||
notice_lang(service, u, MAIL_DELAYED, t - u->lastmail);
|
||||
notice_lang(service, u, MAIL_DELAYED, Config->MailDelay - t - u->lastmail);
|
||||
else if (nr->email.empty())
|
||||
notice_lang(service, u, MAIL_INVALID, nr->nick.c_str());
|
||||
else
|
||||
@@ -63,7 +63,7 @@ bool Mail(User *u, NickCore *nc, const Anope::string &service, const Anope::stri
|
||||
if (!Config->UseMail)
|
||||
notice_lang(service, u, MAIL_DISABLED);
|
||||
else if (t - u->lastmail < Config->MailDelay)
|
||||
notice_lang(service, u, MAIL_DELAYED, t - u->lastmail);
|
||||
notice_lang(service, u, MAIL_DELAYED, Config->MailDelay - t - u->lastmail);
|
||||
else if (nc->email.empty())
|
||||
notice_lang(service, u, MAIL_INVALID, nc->display.c_str());
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user