diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/modules/m_spanningtree/rehash.cpp | 2 | ||||
-rw-r--r-- | src/server.cpp | 26 |
2 files changed, 17 insertions, 11 deletions
diff --git a/src/modules/m_spanningtree/rehash.cpp b/src/modules/m_spanningtree/rehash.cpp index 5f81bb0de..6707b897a 100644 --- a/src/modules/m_spanningtree/rehash.cpp +++ b/src/modules/m_spanningtree/rehash.cpp @@ -41,8 +41,6 @@ bool TreeSocket::RemoteRehash(const std::string &prefix, std::deque<std::string> { this->Instance->SNO->WriteToSnoMask('l',"Remote rehash initiated by \002"+prefix+"\002."); this->Instance->RehashServer(); - Utils->ReadConfiguration(true); - InitializeDisabledCommands(Instance->Config->DisabledCommands, Instance); } Utils->DoOneToAllButSender(prefix,"REHASH",params,prefix); return true; 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() |