diff options
author | Adam <Adam@anope.org> | 2017-04-06 11:20:06 -0400 |
---|---|---|
committer | Adam <Adam@anope.org> | 2017-04-06 11:20:06 -0400 |
commit | 805ea3869c33889de3695c580b85e10d9a4bc147 (patch) | |
tree | 50fc994ac99611762bd77d6d10fe88a40e058be0 /src | |
parent | 2a886acbedb6b6386dbff3e591b0d4035d516b2a (diff) |
Move nc->lastmail to a field
Diffstat (limited to 'src')
-rw-r--r-- | src/mail.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/mail.cpp b/src/mail.cpp index 51068178d..619180520 100644 --- a/src/mail.cpp +++ b/src/mail.cpp @@ -75,7 +75,7 @@ bool Mail::Send(User *u, NickServ::Account *nc, ServiceBot *service, const Anope else if (nc->GetEmail().empty()) return false; - nc->lastmail = Anope::CurTime; + nc->SetLastMail(Anope::CurTime); Thread *t = new Mail::Message(b->Get<Anope::string>("sendfrom"), nc->GetDisplay(), nc->GetEmail(), subject, message); t->Start(); return true; @@ -90,7 +90,8 @@ bool Mail::Send(User *u, NickServ::Account *nc, ServiceBot *service, const Anope u->SendMessage(service, _("E-mail for \002%s\002 is invalid."), nc->GetDisplay().c_str()); else { - u->lastmail = nc->lastmail = Anope::CurTime; + u->lastmail = Anope::CurTime; + nc->SetLastMail(Anope::CurTime); Thread *t = new Mail::Message(b->Get<Anope::string>("sendfrom"), nc->GetDisplay(), nc->GetEmail(), subject, message); t->Start(); return true; @@ -106,7 +107,7 @@ bool Mail::Send(NickServ::Account *nc, const Anope::string &subject, const Anope if (!b->Get<bool>("usemail") || b->Get<Anope::string>("sendfrom").empty() || !nc || nc->GetEmail().empty() || subject.empty() || message.empty()) return false; - nc->lastmail = Anope::CurTime; + nc->SetLastMail(Anope::CurTime); Thread *t = new Mail::Message(b->Get<Anope::string>("sendfrom"), nc->GetDisplay(), nc->GetEmail(), subject, message); t->Start(); |