summaryrefslogtreecommitdiff
path: root/src/memoserv.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2010-09-10 20:31:31 -0400
committerAdam <Adam@anope.org>2010-09-10 20:31:31 -0400
commitf00e76d30a86acf0f18bcde5647eedd50de50569 (patch)
tree04af81a883ea6e71ec36e35a2822487c7f8192c6 /src/memoserv.cpp
parent9eb7562bee7f2a52cf91b0ab0ebc10351f2a46f2 (diff)
Added Anope::CurTime to keep us from calling time() everywhere
Diffstat (limited to 'src/memoserv.cpp')
-rw-r--r--src/memoserv.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/memoserv.cpp b/src/memoserv.cpp
index eec5ab7a3..471424970 100644
--- a/src/memoserv.cpp
+++ b/src/memoserv.cpp
@@ -170,7 +170,6 @@ void memo_send(User *u, const Anope::string &name, const Anope::string &text, in
{
bool ischan, isforbid;
MemoInfo *mi;
- time_t now = time(NULL);
Anope::string source = u->Account()->display;
int is_servoper = u->Account() && u->Account()->IsServicesOper();
@@ -199,9 +198,9 @@ void memo_send(User *u, const Anope::string &name, const Anope::string &text, in
notice_lang(Config->s_MemoServ, u, ischan ? CHAN_X_NOT_REGISTERED : NICK_X_NOT_REGISTERED, name.c_str());
}
}
- else if (z != 2 && Config->MSSendDelay > 0 && u && u->lastmemosend + Config->MSSendDelay > now)
+ else if (z != 2 && Config->MSSendDelay > 0 && u && u->lastmemosend + Config->MSSendDelay > Anope::CurTime)
{
- u->lastmemosend = now;
+ u->lastmemosend = Anope::CurTime;
if (!z)
notice_lang(Config->s_MemoServ, u, MEMO_SEND_PLEASE_WAIT, Config->MSSendDelay);
@@ -220,7 +219,7 @@ void memo_send(User *u, const Anope::string &name, const Anope::string &text, in
}
else
{
- u->lastmemosend = now;
+ u->lastmemosend = Anope::CurTime;
Memo *m = new Memo();
mi->memos.push_back(m);
m->sender = source;
@@ -235,7 +234,7 @@ void memo_send(User *u, const Anope::string &name, const Anope::string &text, in
}
else
m->number = 1;
- m->time = time(NULL);
+ m->time = Anope::CurTime;
m->text = text;
m->SetFlag(MF_UNREAD);
/* Set notify sent flag - DrStein */