X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Finspircd.cpp;h=046b19f8c2359f37535633098b5096e008c1c0ed;hb=76ebc88ccd6fef0bf2d97b607829fb3466e273af;hp=42612fa2de3c3bcbdadad1d492e029d95fbf9320;hpb=488932d457b16a778d75cf2a8213dd9a94058403;p=user%2Fhenk%2Fcode%2Finspircd.git 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(); +} +