*/
#include <signal.h>
+#include "exitcodes.h"
#include "inspircd.h"
case SIGHUP:
Rehash();
break;
+ case SIGTERM:
+ Exit(signal);
+ break;
}
}
+void InspIRCd::Exit(int status)
+{
+#ifdef WINDOWS
+ delete WindowsIPC;
+#endif
+ if (this)
+ {
+ this->SendError("Exiting with status " + ConvToStr(status) + " (" + std::string(ExitCodes[status]) + ")");
+ this->Cleanup();
+ }
+ exit (status);
+}
+
void InspIRCd::Rehash()
{
this->WriteOpers("*** Rehashing config file %s due to SIGHUP",ServerConfig::CleanFilename(this->ConfigFileName));