]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/inspircd.cpp
Merge commit 'refs/merge-requests/5' of git://gitorious.org/inspircd/inspircd into...
[user/henk/code/inspircd.git] / src / inspircd.cpp
index 27060be52f3953d758167024fb1dc4f9af53937a..2ac844bb6abfa625705b493c6ff4bb4d02b2fb2a 100644 (file)
@@ -305,7 +305,8 @@ InspIRCd::InspIRCd(int argc, char** argv) :
         Rehash(&HandleRehash),
         IsNick(&HandleIsNick),
         IsIdent(&HandleIsIdent),
-        FloodQuitUser(&HandleFloodQuitUser)
+        FloodQuitUser(&HandleFloodQuitUser),
+        OnCheckExemption(&HandleOnCheckExemption)
 {
 #ifdef WIN32
        // Strict, frequent checking of memory on debug builds
@@ -343,8 +344,7 @@ InspIRCd::InspIRCd(int argc, char** argv) :
        this->Res = 0;
        this->ConfigThread = NULL;
 
-       // Initialise TIME
-       clock_gettime(CLOCK_REALTIME, &TIME);
+       UpdateTime();
        this->startup_time = TIME.tv_sec;
 
        // This must be created first, so other parts of Insp can use it while starting up
@@ -456,7 +456,7 @@ InspIRCd::InspIRCd(int argc, char** argv) :
        if (do_debug)
        {
                FileWriter* fw = new FileWriter(stdout);
-               FileLogStream* fls = new FileLogStream(DEBUG, fw);
+               FileLogStream* fls = new FileLogStream(RAWIO, fw);
                Logs->AddLogTypes("*", fls, true);
        }
        else if (!this->OpenLog(argv, argc))
@@ -615,7 +615,7 @@ InspIRCd::InspIRCd(int argc, char** argv) :
        }
 #else
        WindowsIPC = new IPC;
-       if(!Config->nofork)
+       if(!Config->cmdline.nofork)
        {
                WindowsForkKillOwner();
                FreeConsole();
@@ -692,7 +692,14 @@ InspIRCd::InspIRCd(int argc, char** argv) :
 
 void InspIRCd::UpdateTime()
 {
+#ifdef HAS_CLOCK_GETTIME
        clock_gettime(CLOCK_REALTIME, &TIME);
+#else
+       struct timeval tv;
+       gettimeofday(&tv, NULL);
+       TIME.tv_sec = tv.tv_sec;
+       TIME.tv_nsec = tv.tv_usec * 1000;
+#endif
 }
 
 int InspIRCd::Run()