1
0
mirror of https://github.com/anope/anope.git synced 2026-06-25 09:16:38 +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
@@ -22,7 +22,7 @@ extern void moduleAddIRCDMsgs();
void introduce_user(const Anope::string &user)
{
/* Watch out for infinite loops... */
time_t now = time(NULL);
time_t now = Anope::CurTime;
static time_t lasttime = now - 4;
if (lasttime >= now - 3)
throw FatalException("introduce_user loop detected");
@@ -427,7 +427,7 @@ void Init(int ac, char **av)
/* Announce ourselves to the logfile. */
Log() << "Anope " << Anope::Version() << " (ircd protocol: " << ircd->name << ") starting up" << (debug || readonly ? " (options:" : "") << (debug ? " debug" : "") << (readonly ? " readonly" : "") << (debug || readonly ? ")" : "");
start_time = time(NULL);
start_time = Anope::CurTime;
/* Set signal handlers. Catch certain signals to let us do things or
* panic as necessary, and ignore all others.