1
0
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:
Adam
2010-08-27 13:44:30 -04:00
parent ea9b945830
commit 73fb94c553
14 changed files with 97 additions and 96 deletions
+2 -2
View File
@@ -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