]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - win/inspircd_win32wrapper.cpp
Move static map of extensions into ServerInstance, add const-correctness
[user/henk/code/inspircd.git] / win / inspircd_win32wrapper.cpp
index 1008cb83874b2ead07b7b66beb13b2c9fabce635..1309e60643ba1d693511248f513e6a07e621a191 100644 (file)
@@ -413,12 +413,12 @@ void ClearConsole()
 /* Many inspircd classes contain function pointers/functors which can be changed to point at platform specific implementations
  * of code. This function repoints these pointers and functors so that calls are windows specific.
  */
-void ChangeWindowsSpecificPointers(InspIRCd* Instance)
+void ChangeWindowsSpecificPointers()
 {
-       Instance->Logs->Log("win32",DEBUG,"Changing to windows specific pointer and functor set");
+       ServerInstance->Logs->Log("win32",DEBUG,"Changing to windows specific pointer and functor set");
 }
 
-DWORD WindowsForkStart(InspIRCd* Instance)
+DWORD WindowsForkStart()
 {
         /* Windows implementation of fork() :P */
        if (owner_processid)
@@ -498,20 +498,20 @@ DWORD WindowsForkStart(InspIRCd* Instance)
         return ExitCode;
 }
 
-void WindowsForkKillOwner(InspIRCd * Instance)
+void WindowsForkKillOwner()
 {
         HANDLE hProcess = OpenProcess(PROCESS_TERMINATE, FALSE, owner_processid);
         if(!hProcess || !owner_processid)
         {
                 printf("Could not open process id %u: %s.\n", owner_processid, dlerror());
-                Instance->Exit(14);
+                ServerInstance->Exit(14);
         }
 
         // die die die
         if(!TerminateProcess(hProcess, 0))
         {
                 printf("Could not TerminateProcess(): %s\n", dlerror());
-                Instance->Exit(14);
+                ServerInstance->Exit(14);
         }
 
         CloseHandle(hProcess);
@@ -522,7 +522,7 @@ bool ValidateDnsServer(ServerConfig* conf, const char* tag, const char* value, V
        if (!*(data.GetString()))
        {
                std::string nameserver;
-               conf->GetInstance()->Logs->Log("win32",DEFAULT,"WARNING: <dns:server> not defined, attempting to find working server in the registry...");
+               ServerInstance->Logs->Log("win32",DEFAULT,"WARNING: <dns:server> not defined, attempting to find working server in the registry...");
                nameserver = FindNameServerWin();
                /* Windows stacks multiple nameservers in one registry key, seperated by commas.
                 * Spotted by Cataclysm.
@@ -535,7 +535,7 @@ bool ValidateDnsServer(ServerConfig* conf, const char* tag, const char* value, V
                if (nameserver.find(' ') != std::string::npos)
                        nameserver = nameserver.substr(0, nameserver.find(' '));
                data.Set(nameserver.c_str());
-               conf->GetInstance()->Logs->Log("win32",DEFAULT,"<dns:server> set to '%s' as first active resolver in registry.", nameserver.c_str());
+               ServerInstance->Logs->Log("win32",DEFAULT,"<dns:server> set to '%s' as first active resolver in registry.", nameserver.c_str());
        }
        return true;
 }