diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-08-11 09:23:46 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-08-11 09:23:46 +0000 |
commit | 76ebc88ccd6fef0bf2d97b607829fb3466e273af (patch) | |
tree | 6b02e7979ce1c4bf75cfc6e59d9de534ccf22827 /src/inspircd.cpp | |
parent | 488932d457b16a778d75cf2a8213dd9a94058403 (diff) |
extern time_t TIME -> InspIRCd::Time()
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4873 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/inspircd.cpp')
-rw-r--r-- | src/inspircd.cpp | 19 |
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(); +} + |