]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/inspircd.cpp
More stuff
[user/henk/code/inspircd.git] / src / inspircd.cpp
index 998e0d1459edf8e451ee41adac160f503c4844db..de725d0e1601f14bfafd5325a3e4edebab1d69e5 100644 (file)
@@ -485,7 +485,7 @@ InspIRCd::InspIRCd(int argc, char** argv)
        /* During startup we don't actually initialize this
         * in the thread engine.
         */
-       this->ConfigThread = new ConfigReaderThread(this);
+       this->ConfigThread = new ConfigReaderThread(this, true, NULL);
        ConfigThread->Run();
        delete ConfigThread;
        this->ConfigThread = NULL;
@@ -636,6 +636,20 @@ int InspIRCd::Run()
                static char window_title[100];
 #endif
 
+               if (this->ConfigThread && this->ConfigThread->GetExitFlag())
+               {
+                       /* Rehash has completed */
+                       this->Logs->Log("CONFIG",DEBUG,"Detected ConfigThread exiting, tidying up...");
+                       delete ConfigThread;
+                       this->XLines->CheckELines();
+                       this->XLines->ApplyLines();
+                       this->Res->Rehash();
+                       this->ResetMaxBans();
+                       InitializeDisabledCommands(Config->DisabledCommands, this);
+                       FOREACH_MOD_I(this, I_OnRehash, OnRehash(Config->RehashUser, Config->RehashParameter));
+                       this->BuildISupport();
+               }
+
                /* time() seems to be a pretty expensive syscall, so avoid calling it too much.
                 * Once per loop iteration is pleanty.
                 */