]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/server.cpp
Merge pull request #472 from SaberUK/master+merge-headers
[user/henk/code/inspircd.git] / src / server.cpp
index 4bd81a6d1ba970bd09b3f4b24d5fd64bc6d64998..6a46034409962144af5106ba1c294c6aaf5a6159 100644 (file)
 #include <signal.h>
 #include "exitcodes.h"
 #include "inspircd.h"
-#include "inspircd_version.h"
 
 void InspIRCd::SignalHandler(int signal)
 {
+#ifdef _WIN32
+       if (signal == SIGTERM)
+#else
        if (signal == SIGHUP)
        {
                Rehash("Caught SIGHUP");
        }
        else if (signal == SIGTERM)
+#endif
        {
                Exit(signal);
        }
@@ -39,9 +42,7 @@ void InspIRCd::SignalHandler(int signal)
 
 void InspIRCd::Exit(int status)
 {
-#ifdef WINDOWS
-       if (WindowsIPC)
-               delete WindowsIPC;
+#ifdef _WIN32
        SetServiceStopped(status);
 #endif
        if (this)
@@ -57,7 +58,6 @@ void InspIRCd::Exit(int status)
 void RehashHandler::Call(const std::string &reason)
 {
        ServerInstance->SNO->WriteToSnoMask('a', "Rehashing config file %s %s",ServerConfig::CleanFilename(ServerInstance->ConfigFileName.c_str()), reason.c_str());
-       ServerInstance->RehashUsersAndChans();
        FOREACH_MOD(I_OnGarbageCollect, OnGarbageCollect());
        if (!ServerInstance->ConfigThread)
        {
@@ -70,9 +70,12 @@ std::string InspIRCd::GetVersionString(bool operstring)
 {
        char versiondata[MAXBUF];
        if (operstring)
-               snprintf(versiondata,MAXBUF,"%s %s :%s [%s,%s,%s]",VERSION,Config->ServerName.c_str(),SYSTEM,REVISION,SE->GetName().c_str(),Config->sid.c_str());
+       {
+               std::string sename = SE->GetName();
+               snprintf(versiondata,MAXBUF,"%s %s :%s [%s,%s,%s]",VERSION, Config->ServerName.c_str(), SYSTEM,REVISION, sename.c_str(), Config->sid.c_str());
+       }
        else
-               snprintf(versiondata,MAXBUF,"InspIRCd-2.0 %s :%s",Config->ServerName.c_str(),Config->CustomVersion.c_str());
+               snprintf(versiondata,MAXBUF,"%s %s :%s",BRANCH,Config->ServerName.c_str(),Config->CustomVersion.c_str());
        return versiondata;
 }