diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-02-24 19:41:49 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-02-24 19:41:49 +0000 |
commit | ea3a764bb870e0bab1fa6498564eb63b8ede72be (patch) | |
tree | 644d7aab534a6bc3ad78116b56b9263ddbcd152a /src/server.cpp | |
parent | e83461d2e2e359d5ebbd7d6e553bb994a8e6524d (diff) |
This should fix remote rehash
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9030 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/server.cpp')
-rw-r--r-- | src/server.cpp | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/src/server.cpp b/src/server.cpp index 102fb35d3..4814852c4 100644 --- a/src/server.cpp +++ b/src/server.cpp @@ -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. * * --------------------------------------------------- */ @@ -49,20 +49,28 @@ void InspIRCd::Rehash() this->SNO->WriteToSnoMask('A', "Rehashing config file %s due to SIGHUP",ServerConfig::CleanFilename(this->ConfigFileName)); 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() |