summaryrefslogtreecommitdiff
path: root/src/inspircd.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/inspircd.cpp')
-rw-r--r--src/inspircd.cpp19
1 files changed, 15 insertions, 4 deletions
diff --git a/src/inspircd.cpp b/src/inspircd.cpp
index 42612fa2d..046b19f8c 100644
--- a/src/inspircd.cpp
+++ b/src/inspircd.cpp
@@ -76,8 +76,6 @@ int iterations = 0;
insp_sockaddr client, server;
socklen_t length;
-time_t TIME = time(NULL), OLDTIME = time(NULL);
-
char lowermap[255];
void InspIRCd::AddServerName(const std::string &servername)
@@ -219,8 +217,8 @@ InspIRCd::InspIRCd(int argc, char** argv) : ModCount(-1)
this->Config = new ServerConfig(this);
this->Start();
this->module_sockets.clear();
- this->startup_time = time(NULL);
- srand(time(NULL));
+ this->TIME = this->OLDTIME = this->startup_time = time(NULL);
+ srand(this->TIME);
log(DEBUG,"*** InspIRCd starting up!");
if (!ServerConfig::FileExists(CONFIG_FILE))
{
@@ -1039,3 +1037,16 @@ int InspIRCd::GetModuleCount()
return this->ModCount;
}
+time_t InspIRCd::Time()
+{
+ return TIME;
+}
+
+classbase::classbase()
+{
+ /* This is in here only to make use of ServerInstance
+ * without using an ugly extern
+ */
+ this->age = ServerInstance->Time();
+}
+