1
0
mirror of https://github.com/anope/anope.git synced 2026-06-28 02:16:37 +02:00

Added Anope::CurTime to keep us from calling time() everywhere

This commit is contained in:
Adam
2010-09-10 20:31:31 -04:00
parent 9eb7562bee
commit f00e76d30a
64 changed files with 224 additions and 240 deletions
+2 -2
View File
@@ -114,7 +114,7 @@ class ExceptionViewCallback : public ExceptionListCallback
char timebuf[32];
struct tm tm;
time_t t = time(NULL);
time_t t = Anope::CurTime;
tm = *localtime(exceptions[index]->time ? &exceptions[index]->time : &t);
strftime_lang(timebuf, sizeof(timebuf), u, STRFTIME_SHORT_DATE_FORMAT, &tm);
@@ -249,7 +249,7 @@ class CommandOSException : public Command
return MOD_CONT;
}
else if (expires > 0)
expires += time(NULL);
expires += Anope::CurTime;
int limit = !limitstr.empty() && limitstr.is_number_only() ? convertTo<int>(limitstr) : -1;