summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2008-02-24 19:41:49 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2008-02-24 19:41:49 +0000
commitea3a764bb870e0bab1fa6498564eb63b8ede72be (patch)
tree644d7aab534a6bc3ad78116b56b9263ddbcd152a /src
parente83461d2e2e359d5ebbd7d6e553bb994a8e6524d (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')
-rw-r--r--src/modules/m_spanningtree/rehash.cpp2
-rw-r--r--src/server.cpp26
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()