diff options
author | robbeh <robbeh@5417fbe8-f217-4b02-8779-1006273d7864> | 2008-11-15 16:11:40 +0000 |
---|---|---|
committer | robbeh <robbeh@5417fbe8-f217-4b02-8779-1006273d7864> | 2008-11-15 16:11:40 +0000 |
commit | c968d32ee2570650cd8430a9dbd5375bcfdd26b5 (patch) | |
tree | 82333dd56b0b62efd852a4bb57570c6daa2cbe4b /src/mail.c | |
parent | dde05e96cff5b0c5d5587265e03b31c585f53424 (diff) |
applied 1.8.0s fix for the /ns resend issue
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1698 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src/mail.c')
-rw-r--r-- | src/mail.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/mail.c b/src/mail.c index 43d8e7845..4aa3b0a2a 100644 --- a/src/mail.c +++ b/src/mail.c @@ -30,15 +30,16 @@ MailInfo *MailRegBegin(User * u, NickRequest * nr, char *subject, char *service) { + int timeToWait = 0; if (!u || !nr || !subject || !service) { return NULL; } if (!UseMail) { notice_lang(service, u, MAIL_DISABLED); - } else if ((time(NULL) - u->lastmail < MailDelay) - || (time(NULL) - nr->lastmail < MailDelay)) { - notice_lang(service, u, MAIL_DELAYED, MailDelay); + } else if ((time(NULL) - u->lastmail < MailDelay)) { + timeToWait = MailDelay - (time(NULL) - u->lastmail); + notice_lang(service, u, MAIL_DELAYED, timeToWait); } else if (!nr->email) { notice_lang(service, u, MAIL_INVALID, nr->nick); } else { |