]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/server.cpp
This should save 128 bytes per user for non-opers. Well worth it imho for a reasonabl...
[user/henk/code/inspircd.git] / src / server.cpp
index 191c84ce0bdbe92a5362ebdb35e317942008ad06..4814852c499bfc31f570108eb6ed0b50a4b76fe6 100644 (file)
@@ -6,7 +6,7 @@
  * See: http://www.inspircd.org/wiki/index.php/Credits
  *
  * This program is free but copyrighted software; see
- *            the file COPYING for details.
+ *         the file COPYING for details.
  *
  * ---------------------------------------------------
  */
@@ -47,25 +47,30 @@ void InspIRCd::Exit(int status)
 void InspIRCd::Rehash()
 {
        this->SNO->WriteToSnoMask('A', "Rehashing config file %s due to SIGHUP",ServerConfig::CleanFilename(this->ConfigFileName));
-       this->Logs->CloseLogs();
-       if (!this->OpenLog(this->Config->argv, this->Config->argc))
-               this->SNO->WriteToSnoMask('A', "ERROR: Could not open logfile %s: %s", Config->logpath.c_str(), strerror(errno));
        this->RehashUsersAndChans();
        FOREACH_MOD_I(this, I_OnGarbageCollect, OnGarbageCollect());
-       /*this->Config->Read(false,NULL);*/
-       this->ResetMaxBans();
-       this->Res->Rehash();
-       FOREACH_MOD_I(this,I_OnRehash,OnRehash(NULL,""));
-       this->BuildISupport();
+       if (!this->ConfigThread)
+       {
+               Config->RehashUser = NULL;
+               Config->RehashParameter = "";
+
+               ConfigThread = new ConfigReaderThread(this, false, NULL);
+               Threads->Create(ConfigThread);
+       }
 }
 
 void InspIRCd::RehashServer()
 {
        this->SNO->WriteToSnoMask('A', "Rehashing config file");
        this->RehashUsersAndChans();
-       /*this->Config->Read(false,NULL);*/
-       this->ResetMaxBans();
-       this->Res->Rehash();
+       if (!this->ConfigThread)
+       {
+               Config->RehashUser = NULL;
+               Config->RehashParameter = "";
+
+               ConfigThread = new ConfigReaderThread(this, false, NULL);
+               Threads->Create(ConfigThread);
+       }
 }
 
 std::string InspIRCd::GetVersionString()