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/inspircd.cpp | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) (limited to 'src/inspircd.cpp') 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(); +} + -- cgit v1.2.3