summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2008-02-24 17:45:21 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2008-02-24 17:45:21 +0000
commitb119a88b55e7f5f3260ff21e78a5c9d1cf491cc8 (patch)
treef3daefd405dcd169a40033647038850e34cf8e17 /src
parentf7df5c69c4c54ebac32b1f3af3381495bef2cbd5 (diff)
Allow for 'bail' and 'user' parameters to rehash thread
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9022 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r--src/commands/cmd_rehash.cpp2
-rw-r--r--src/configreader.cpp5
-rw-r--r--src/inspircd.cpp2
3 files changed, 6 insertions, 3 deletions
diff --git a/src/commands/cmd_rehash.cpp b/src/commands/cmd_rehash.cpp
index 85df91930..7fdb9862e 100644
--- a/src/commands/cmd_rehash.cpp
+++ b/src/commands/cmd_rehash.cpp
@@ -41,7 +41,7 @@ CmdResult CommandRehash::Handle (const char* const* parameters, int pcnt, User *
FOREACH_MOD(I_OnGarbageCollect, OnGarbageCollect());
if (!ServerInstance->ConfigThread)
{
- ServerInstance->ConfigThread = new ConfigReaderThread(ServerInstance);
+ ServerInstance->ConfigThread = new ConfigReaderThread(ServerInstance, false, user);
ServerInstance->Threads->Create(ServerInstance->ConfigThread);
}
else
diff --git a/src/configreader.cpp b/src/configreader.cpp
index 99261120f..12e33ad34 100644
--- a/src/configreader.cpp
+++ b/src/configreader.cpp
@@ -799,6 +799,8 @@ void ServerConfig::Read(bool bail, User* user)
static char announceinvites[MAXBUF]; /* options:announceinvites setting */
errstr.clear();
+ include_stack.clear();
+
/* These tags MUST occur and must ONLY occur once in the config file */
static const char* Once[] = { "server", "admin", "files", "power", "options", NULL };
@@ -2156,6 +2158,7 @@ bool DoneELine(ServerConfig* conf, const char* tag)
void ConfigReaderThread::Run()
{
- ServerInstance->Config->Read(true, NULL);
+ /* TODO: TheUser may be invalid by the time we get here! Check its validity, or pass a UID would be better */
+ ServerInstance->Config->Read(do_bail, TheUser);
}
diff --git a/src/inspircd.cpp b/src/inspircd.cpp
index 998e0d145..aaad2746a 100644
--- a/src/inspircd.cpp
+++ b/src/inspircd.cpp
@@ -485,7 +485,7 @@ InspIRCd::InspIRCd(int argc, char** argv)
/* During startup we don't actually initialize this
* in the thread engine.
*/
- this->ConfigThread = new ConfigReaderThread(this);
+ this->ConfigThread = new ConfigReaderThread(this, true, NULL);
ConfigThread->Run();
delete ConfigThread;
this->ConfigThread = NULL;