* | Inspire Internet Relay Chat Daemon |
* +------------------------------------+
*
- * InspIRCd: (C) 2002-2007 InspIRCd Development Team
+ * InspIRCd: (C) 2002-2008 InspIRCd Development Team
* 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.
*
* ---------------------------------------------------
*/
void InspIRCd::Rehash()
{
- this->WriteOpers("*** Rehashing config file %s due to SIGHUP",ServerConfig::CleanFilename(this->ConfigFileName));
- this->CloseLog();
- if (!this->OpenLog(this->Config->argv, this->Config->argc))
- this->WriteOpers("*** ERROR: Could not open logfile %s: %s", Config->logpath.c_str(), strerror(errno));
+ 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->WriteOpers("*** Rehashing config file");
+ 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()
if(**itr == servername)
return;
- string * ns = new string(servername);
+ std::string * ns = new std::string(servername);
servernames.push_back(ns);
}
if(**itr == servername)
return (*itr)->c_str();
- servernames.push_back(new string(servername));
+ servernames.push_back(new std::string(servername));
itr = --servernames.end();
return (*itr)->c_str();
}