1
0
mirror of https://github.com/anope/anope.git synced 2026-07-10 05:03:13 +02:00

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
This commit is contained in:
robbeh
2008-11-15 16:11:40 +00:00
parent dde05e96cf
commit c968d32ee2
3 changed files with 8 additions and 7 deletions
+3 -3
View File
@@ -428,11 +428,11 @@ int do_resend(User * u)
if (NSEmailReg) {
if ((nr = findrequestnick(u->nick))) {
if (time(NULL) < nr->lastmail + NSResendDelay) {
return MOD_CONT;
} else {
nr->lastmail = time(NULL);
notice_lang(s_NickServ, u, MAIL_LATER);
return MOD_CONT;
}
if (do_sendregmail(u, nr) == 0) {
nr->lastmail = time(NULL);
notice_lang(s_NickServ, u, NICK_REG_RESENT, nr->email);
alog("%s: re-sent registration verification code for %s to %s", s_NickServ, nr->nick, nr->email);
} else {
+4 -3
View File
@@ -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 {