1
0
mirror of https://github.com/anope/anope.git synced 2026-07-02 11:26: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
@@ -158,7 +158,7 @@ class OSDefcon : public Module
if (CheckDefCon(DEFCON_AKILL_NEW_CLIENTS))
{
Log(OperServ, "operserv/defcon") << "DEFCON: adding akill for *@" << u->host;
XLine *x = SGLine->Add(NULL, NULL, "*@" + u->host, time(NULL) + Config->DefConAKILL, !Config->DefConAkillReason.empty() ? Config->DefConAkillReason : "DEFCON AKILL");
XLine *x = SGLine->Add(NULL, NULL, "*@" + u->host, Anope::CurTime + Config->DefConAKILL, !Config->DefConAkillReason.empty() ? Config->DefConAkillReason : "DEFCON AKILL");
if (x)
x->By = Config->s_OperServ;
}
@@ -289,7 +289,7 @@ class OSDefcon : public Module
++session->hits;
if (Config->MaxSessionKill && session->hits >= Config->MaxSessionKill)
{
SGLine->Add(NULL, NULL, "*@" + u->host, time(NULL) + Config->SessionAutoKillExpiry, "Session limit exceeded");
SGLine->Add(NULL, NULL, "*@" + u->host, Anope::CurTime + Config->SessionAutoKillExpiry, "Session limit exceeded");
ircdproto->SendGlobops(OperServ, "Added a temporary AKILL for \2*@%s\2 due to excessive connections", u->host.c_str());
}
}