summaryrefslogtreecommitdiff
path: root/src/mail.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2010-08-27 13:44:30 -0400
committerAdam <Adam@anope.org>2010-08-27 13:44:30 -0400
commit73fb94c55344b6ad788c925bf13325236402891f (patch)
tree48ac3308448b8494074d8e6c326adf75ddbacdc0 /src/mail.cpp
parentea9b945830166ff237799460aba6236e4132a075 (diff)
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.
Diffstat (limited to 'src/mail.cpp')
-rw-r--r--src/mail.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mail.cpp b/src/mail.cpp
index 1cfdd6c09..354c7e2e7 100644
--- a/src/mail.cpp
+++ b/src/mail.cpp
@@ -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