1
0
mirror of https://github.com/unrealircd/unrealircd.git synced 2026-07-04 19:23:13 +02:00

Fix service on Windows not working in UnrealIRCd 5 now that we

have the bin\ directory.
This commit is contained in:
Bram Matthys
2019-11-11 09:43:12 +01:00
parent 39fc55dca3
commit 52dbfc38b7
+5 -5
View File
@@ -97,11 +97,6 @@ VOID WINAPI ServiceMain(DWORD dwArgc, LPTSTR *lpszArgv)
IsService = TRUE;
/* Go one level up, since we are currently in the bin\ subdir
* and we want to be in (f.e.) "C:\Program Files\UnrealIRCd 5"
*/
chdir("..");
/* Initialize the service structure */
IRCDStatus.dwServiceType = SERVICE_WIN32_OWN_PROCESS;
IRCDStatus.dwCurrentState = SERVICE_START_PENDING;
@@ -116,6 +111,11 @@ VOID WINAPI ServiceMain(DWORD dwArgc, LPTSTR *lpszArgv)
*folder = 0;
chdir(path);
/* Go one level up, since we are currently in the bin\ subdir
* and we want to be in (f.e.) "C:\Program Files\UnrealIRCd 5"
*/
chdir("..");
/* Register the service controller */
IRCDStatusHandle = RegisterServiceCtrlHandler("UnrealIRCd", IRCDCtrlHandler);