diff options
Diffstat (limited to 'src/server.cpp')
-rw-r--r-- | src/server.cpp | 36 |
1 files changed, 23 insertions, 13 deletions
diff --git a/src/server.cpp b/src/server.cpp index 2ab452fc8..7f05aee7b 100644 --- a/src/server.cpp +++ b/src/server.cpp @@ -11,22 +11,32 @@ * --------------------------------------------------- */ +#include <signal.h> #include "inspircd.h" -void InspIRCd::Rehash(int status) + +void InspIRCd::SignalHandler(int signal) +{ + switch (signal) + { + case SIGHUP: + Rehash(); + break; + } +} + +void InspIRCd::Rehash() { -/* - SI->WriteOpers("*** Rehashing config file %s due to SIGHUP",ServerConfig::CleanFilename(SI->ConfigFileName)); - SI->CloseLog(); - SI->OpenLog(SI->Config->argv, SI->Config->argc); - SI->RehashUsersAndChans(); - FOREACH_MOD_I(SI, I_OnGarbageCollect, OnGarbageCollect()); - SI->Config->Read(false,NULL); - SI->ResetMaxBans(); - SI->Res->Rehash(); - FOREACH_MOD_I(SI,I_OnRehash,OnRehash(NULL,"")); - SI->BuildISupport(); -*/ + this->WriteOpers("*** Rehashing config file %s due to SIGHUP",ServerConfig::CleanFilename(this->ConfigFileName)); + this->CloseLog(); + this->OpenLog(this->Config->argv, this->Config->argc); + 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(); } void InspIRCd::RehashServer() |