From ea3a764bb870e0bab1fa6498564eb63b8ede72be Mon Sep 17 00:00:00 2001 From: brain Date: Sun, 24 Feb 2008 19:41:49 +0000 Subject: This should fix remote rehash git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9030 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_spanningtree/rehash.cpp | 2 -- src/server.cpp | 26 +++++++++++++++++--------- 2 files changed, 17 insertions(+), 11 deletions(-) (limited to 'src') 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 { 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() -- cgit v1.2.3