From 76ebc88ccd6fef0bf2d97b607829fb3466e273af Mon Sep 17 00:00:00 2001 From: brain Date: Fri, 11 Aug 2006 09:23:46 +0000 Subject: extern time_t TIME -> InspIRCd::Time() git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4873 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/xline.cpp | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) (limited to 'src/xline.cpp') diff --git a/src/xline.cpp b/src/xline.cpp index 64a5c93a6..6e40180ff 100644 --- a/src/xline.cpp +++ b/src/xline.cpp @@ -58,10 +58,6 @@ extern InspIRCd* ServerInstance; * -- Brain */ - - -extern time_t TIME; - /* Lists for temporary lines with an expiry time */ std::vector klines; @@ -153,7 +149,7 @@ bool add_gline(long duration, const char* source,const char* reason,const char* strlcpy(item.reason,reason,MAXBUF); strlcpy(item.source,source,255); item.n_matches = 0; - item.set_time = TIME; + item.set_time = ServerInstance->Time(); if (duration) { @@ -179,7 +175,7 @@ bool add_eline(long duration, const char* source, const char* reason, const char strlcpy(item.reason,reason,MAXBUF); strlcpy(item.source,source,255); item.n_matches = 0; - item.set_time = TIME; + item.set_time = ServerInstance->Time(); if (duration) { elines.push_back(item); @@ -204,7 +200,7 @@ bool add_qline(long duration, const char* source, const char* reason, const char strlcpy(item.source,source,255); item.n_matches = 0; item.is_global = false; - item.set_time = TIME; + item.set_time = ServerInstance->Time(); if (duration) { qlines.push_back(item); @@ -235,7 +231,7 @@ bool add_zline(long duration, const char* source, const char* reason, const char strlcpy(item.source,source,255); item.n_matches = 0; item.is_global = false; - item.set_time = TIME; + item.set_time = ServerInstance->Time(); if (duration) { zlines.push_back(item); @@ -259,7 +255,7 @@ bool add_kline(long duration, const char* source, const char* reason, const char strlcpy(item.reason,reason,MAXBUF); strlcpy(item.source,source,255); item.n_matches = 0; - item.set_time = TIME; + item.set_time = ServerInstance->Time(); if (duration) { klines.push_back(item); @@ -602,7 +598,7 @@ bool QSortComparison ( const QLine one, const QLine two ) void expire_lines() { - time_t current = TIME; + time_t current = ServerInstance->Time(); /* Because we now store all our XLines in sorted order using (i->duration + i->set_time) as a key, this * means that to expire the XLines we just need to do a while, picking off the top few until there are -- cgit v1.3.1-10-gc9f91