summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/modules/extra/m_pgsql.cpp4
-rw-r--r--src/modules/m_blockamsg.cpp6
-rw-r--r--src/modules/m_connflood.cpp4
-rw-r--r--src/modules/m_httpd.cpp3
-rw-r--r--src/modules/m_safelist.cpp8
-rw-r--r--src/modules/m_securelist.cpp2
6 files changed, 14 insertions, 13 deletions
diff --git a/src/modules/extra/m_pgsql.cpp b/src/modules/extra/m_pgsql.cpp
index 0389ddcd5..e4319aed5 100644
--- a/src/modules/extra/m_pgsql.cpp
+++ b/src/modules/extra/m_pgsql.cpp
@@ -670,7 +670,7 @@ SQLConn::SQLConn(InspIRCd* SI, ModulePgSQL* self, const SQLhost& hi)
strlcpy(this->host, dbhost.c_str(), MAXBUF);
strlcpy(this->IP, dbhost.c_str(), MAXBUF);
this->port = dbport;
- idle = TIME;
+ idle = this->Instance->Time();
this->ClosePending = false;
@@ -806,7 +806,7 @@ bool SQLConn::DoConnectedPoll()
/* We just read stuff from the server, that counts as it being alive
* so update the idle-since time :p
*/
- idle = TIME;
+ idle = this->Instance->Time();
if(PQisBusy(sql))
{
diff --git a/src/modules/m_blockamsg.cpp b/src/modules/m_blockamsg.cpp
index 8c0aab795..59c03e1e3 100644
--- a/src/modules/m_blockamsg.cpp
+++ b/src/modules/m_blockamsg.cpp
@@ -133,7 +133,7 @@ public:
// OR
// The number of target channels is equal to the number of channels the sender is on..a little suspicious.
// Check it's more than 1 too, or else users on one channel would have fun.
- if((m && (m->message == parameters[1]) && (m->target != parameters[0]) && (ForgetDelay != -1) && (m->sent >= TIME-ForgetDelay)) || ((targets > 1) && (targets == userchans)))
+ if((m && (m->message == parameters[1]) && (m->target != parameters[0]) && (ForgetDelay != -1) && (m->sent >= ServerInstance->Time()-ForgetDelay)) || ((targets > 1) && (targets == userchans)))
{
// Block it...
if(action == IBLOCK_KILLOPERS || action == IBLOCK_NOTICEOPERS)
@@ -152,11 +152,11 @@ public:
// If there's already a BlockedMessage allocated, use it.
m->message = parameters[1];
m->target = parameters[0];
- m->sent = TIME;
+ m->sent = ServerInstance->Time();
}
else
{
- m = new BlockedMessage(parameters[1], parameters[0], TIME);
+ m = new BlockedMessage(parameters[1], parameters[0], ServerInstance->Time());
user->Extend("amsgblock", (char*)m);
}
}
diff --git a/src/modules/m_connflood.cpp b/src/modules/m_connflood.cpp
index 291074c98..ffa2fba83 100644
--- a/src/modules/m_connflood.cpp
+++ b/src/modules/m_connflood.cpp
@@ -71,12 +71,12 @@ public:
/* seconds to wait when the server just booted */
boot_wait = conf->ReadInteger("connflood", "bootwait", 0, true);
- first = TIME;
+ first = ServerInstance->Time();
}
virtual void OnUserRegister(userrec* user)
{
- time_t next = TIME;
+ time_t next = ServerInstance->Time();
if (!first)
first = next - boot_wait;
diff --git a/src/modules/m_httpd.cpp b/src/modules/m_httpd.cpp
index c433553be..6e5ddd514 100644
--- a/src/modules/m_httpd.cpp
+++ b/src/modules/m_httpd.cpp
@@ -167,7 +167,8 @@ class HttpSocket : public InspSocket
void SendHeaders(unsigned long size, int response, const std::string &extraheaders)
{
- struct tm *timeinfo = localtime(&TIME);
+ time_t local = this->Instance->Time();
+ struct tm *timeinfo = localtime(&local);
this->Write("HTTP/1.1 "+ConvToStr(response)+" "+Response(response)+"\r\nDate: ");
this->Write(asctime(timeinfo));
if (extraheaders.empty())
diff --git a/src/modules/m_safelist.cpp b/src/modules/m_safelist.cpp
index ef8065637..c7faf7fad 100644
--- a/src/modules/m_safelist.cpp
+++ b/src/modules/m_safelist.cpp
@@ -55,7 +55,7 @@ class ListTimer : public InspTimer
public:
- ListTimer(InspIRCd* Instance, long interval) : InspTimer(interval,TIME), ServerInstance(Instance)
+ ListTimer(InspIRCd* Instance, long interval) : InspTimer(interval,Instance->Time()), ServerInstance(Instance)
{
}
@@ -197,7 +197,7 @@ class ModuleSafeList : public Module
user->GetExt("safelist_last", last_list_time);
if (last_list_time)
{
- if (TIME < (*last_list_time)+60)
+ if (ServerInstance->Time() < (*last_list_time)+60)
{
user->WriteServ("NOTICE %s :*** Woah there, slow down a little, you can't /LIST so often!",user->nick);
return 1;
@@ -210,12 +210,12 @@ class ModuleSafeList : public Module
/*
* start at channel 0! ;)
*/
- ld = new ListData(0,TIME);
+ ld = new ListData(0,ServerInstance->Time());
user->Extend("safelist_cache", ld);
listusers.push_back(user);
time_t* llt = new time_t;
- *llt = TIME;
+ *llt = ServerInstance->Time();
user->Extend("safelist_last", llt);
return 1;
diff --git a/src/modules/m_securelist.cpp b/src/modules/m_securelist.cpp
index 1e65fcce0..92049497f 100644
--- a/src/modules/m_securelist.cpp
+++ b/src/modules/m_securelist.cpp
@@ -59,7 +59,7 @@ class ModuleSecureList : public Module
if (!validated)
return 0;
- if ((command == "LIST") && (TIME < (user->signon+60)) && (!*user->oper))
+ if ((command == "LIST") && (ServerInstance->Time() < (user->signon+60)) && (!*user->oper))
{
user->WriteServ("NOTICE %s :*** You cannot list within the first minute of connecting. Please try again later.",user->nick);
/* Some crap clients (read: mIRC, various java chat applets) muck up if they don't