summaryrefslogtreecommitdiff
path: root/src/inspircd.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/inspircd.cpp')
-rw-r--r--src/inspircd.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/inspircd.cpp b/src/inspircd.cpp
index dc4986755..cd99e63b6 100644
--- a/src/inspircd.cpp
+++ b/src/inspircd.cpp
@@ -193,6 +193,7 @@ InspIRCd::InspIRCd(int argc, char** argv)
this->SNO = new SnomaskManager(this);
this->Start();
this->TIME = this->OLDTIME = this->startup_time = time(NULL);
+ this->time_delta = 0;
this->next_call = this->TIME + 3;
srand(this->TIME);
this->Log(DEBUG,"*** InspIRCd starting up!");
@@ -804,11 +805,21 @@ int InspIRCd::GetModuleCount()
return this->ModCount;
}
-time_t InspIRCd::Time()
+time_t InspIRCd::Time(bool delta)
{
+ if (delta)
+ return TIME + time_delta;
return TIME;
}
+int InspIRCd::SetTimeDelta(int delta)
+{
+ int old = time_delta;
+ time_delta += delta;
+ this->Log(DEBUG, "Time delta set to %d (was %d)", time_delta, old);
+ return old;
+}
+
bool FileLogger::Readable()
{
return false;