diff --git a/doc/compiling_win32.txt b/doc/compiling_win32.txt index 667e7a159..00b57c01c 100644 --- a/doc/compiling_win32.txt +++ b/doc/compiling_win32.txt @@ -100,7 +100,7 @@ M_OPER.obj : error LNK2019: unresolved external symbol _sendto_snomask_global (note: the exact name of the symbol will vary!) -Then you will have to rebuild the wircd.def symbol file. You do this by +Then you will have to rebuild the unrealircd.def symbol file. You do this by downloading http://www.vulnscan.org/tmp/dlltool.exe and putting the file somewhere in your path (eg: c:\winnt\system32). Then, to compile you do this: diff --git a/include/h.h b/include/h.h index fcdec6860..5dec6102e 100644 --- a/include/h.h +++ b/include/h.h @@ -535,7 +535,7 @@ extern char *get_cptr_status(aClient *); extern char *get_snostr(long); #ifdef _WIN32 extern void InitDebug(void); -extern int InitwIRCD(int argc, char **); +extern int InitUnrealIRCd(int argc, char **); extern void SocketLoop(void *); #endif extern void sendto_chmodemucrap(aClient *, aChannel *, char *); diff --git a/makefile.win32 b/makefile.win32 index e347b806e..fd797a37e 100644 --- a/makefile.win32 +++ b/makefile.win32 @@ -131,12 +131,12 @@ CFLAGSST=$(DBGCFLAGST) $(TRE_INC) $(PCRE2_INC) $(CARES_INC) $(LIBCURL_INC) $(OPE $(CURLCFLAGS) $(FD_SETSIZE) $(SSLCFLAGS) $(NS_ADDRESS) /D NOSPOOF=1 /c /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _USE_32BIT_TIME_T LFLAGS=kernel32.lib user32.lib gdi32.lib shell32.lib ws2_32.lib advapi32.lib \ dbghelp.lib oldnames.lib comctl32.lib comdlg32.lib $(CARES_LIB) $(CARESLIB) $(TRE_LIB) $(TRELIB) \ - $(PCRE2_LIB) $(PCRE2LIB) $(OPENSSL_LIB) $(SSLLIBS) $(LIBCURL_LIB) $(CURLLIB) /def:wircd.def /implib:wircd.lib \ - /nologo $(DBGLFLAG) /out:WIRCD.EXE + $(PCRE2_LIB) $(PCRE2LIB) $(OPENSSL_LIB) $(SSLLIBS) $(LIBCURL_LIB) $(CURLLIB) /def:UnrealIRCd.def /implib:UnrealIRCd.lib \ + /nologo $(DBGLFLAG) /out:UnrealIRCd.exe MODCFLAGS=$(MODDBGCFLAG) $(SSLCFLAGS) $(CURLCFLAGS) /J /Fesrc/modules/ \ /Fosrc/modules/ /nologo $(TRE_INC) $(PCRE2_INC) $(CARES_INC) $(LIBCURL_INC) $(OPENSSL_INC) /I ./INCLUDE /D \ DYNAMIC_LINKING /D NOSPOOF /D MODULE_COMPILE /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _USE_32BIT_TIME_T -MODLFLAGS=/link /def:src/modules/module.def wircd.lib ws2_32.lib $(TRE_LIB) $(TRELIB) \ +MODLFLAGS=/link /def:src/modules/module.def UnrealIRCd.lib ws2_32.lib $(TRE_LIB) $(TRELIB) \ $(PCRE2_LIB) $(PCRE2LIB) $(CARES_LIB) $(OPENSSL_LIB) $(SSLLIBS) \ $(LIBCURL_LIB) $(CURLLIB) @@ -244,7 +244,7 @@ DLL_FILES=SRC/MODULES/M_CHGHOST.DLL SRC/MODULES/M_SDESC.DLL SRC/MODULES/M_SETIDE SRC/MODULES/EXTBANS/OPERCLASS.DLL \ SRC/MODULES/EXTBANS/CERTFP.DLL -ALL: CONF UNREAL.EXE WIRCD.EXE MODULES +ALL: CONF UNREALSVC.EXE UnrealIRCd.exe MODULES CLEAN: -@erase src\*.obj >NUL @@ -258,14 +258,14 @@ CLEAN: -@erase src\modules\snomasks\*.dll >NUL -@erase src\modules\extbans\*.dll >NUL -@erase .\*.exe >NUL - -@erase wircd.lib >NUL + -@erase UnrealIRCd.lib >NUL -@erase src\modules\*.exp >NUL -@erase src\modules\*.lib >NUL -@erase src\modules\*.pdb >NUL -@erase src\modules\*.ilk >NUL -./UNREAL.EXE: SRC/UNREAL.OBJ SRC/WIN32/UNREAL.RES - $(LINK) $(DBGLFLAGST) advapi32.lib src/unreal.obj src/win32/unreal.res +./UNREALSVC.EXE: SRC/UNREALSVC.OBJ SRC/WIN32/UNREALSVC.RES + $(LINK) $(DBGLFLAGST) advapi32.lib src/unrealsvc.obj src/win32/unrealsvc.res CONF: -@copy include\win32\setup.h include\setup.h >NUL @@ -274,10 +274,10 @@ CONF: -./WIRCD.EXE: $(OBJ_FILES) SRC/win32/WIN32.RES +./UnrealIRCd.exe: $(OBJ_FILES) SRC/win32/WIN32.RES $(LINK) $(LFLAGS) $(OBJ_FILES) SRC/win32/WIN32.RES /MAP -@erase src\win32\win32.res - $(MT) -manifest WIRCD.EXE.manifest -outputresource:WIRCD.EXE;1 + $(MT) -manifest UnrealIRCd.exe.manifest -outputresource:UnrealIRCd.exe;1 !IFNDEF DEBUGEXTRA @echo Standard version built !ELSE @@ -416,8 +416,8 @@ src/debug.obj: src/win32/debug.c $(INCLUDES) src/win32.obj: src/win32/win32.c $(INCLUDES) $(CC) $(CFLAGS) src/win32/win32.c -src/unreal.obj: src/win32/unreal.c $(INCLUDES) - $(CC) $(CFLAGSST) src/win32/unreal.c +src/unrealsvc.obj: src/win32/unrealsvc.c $(INCLUDES) + $(CC) $(CFLAGSST) src/win32/unrealsvc.c src/modules.obj: src/modules.c $(INCLUDES) $(CC) $(CFLAGS) src/modules.c @@ -483,9 +483,9 @@ src/win32/win32.res: src/win32/win32gui.rc $(RC) /l 0x409 /fosrc/win32/win32.res /i ./include /i ./src \ /d NDEBUG src/win32/win32gui.rc -src/win32/unreal.res: src/win32/unreal.rc - $(RC) /l 0x409 /fosrc/win32/unreal.res /i ./include /i ./src \ - /d NDEBUG src/win32/unreal.rc +src/win32/unrealsvc.res: src/win32/unrealsvc.rc + $(RC) /l 0x409 /fosrc/win32/unrealsvc.res /i ./include /i ./src \ + /d NDEBUG src/win32/unrealsvc.rc ################# Modules ################# @@ -495,8 +495,8 @@ CUSTOMMODULE: src/modules/$(MODULEFILE).c SYMBOLFILE: $(CC) src/win32/def-clean.c - dlltool --output-def wircd.def.in --export-all-symbols $(EXP_OBJ_FILES) - def-clean wircd.def.in wircd.def + dlltool --output-def UnrealIRCd.def.in --export-all-symbols $(EXP_OBJ_FILES) + def-clean UnrealIRCd.def.in UnrealIRCd.def MODULES: $(DLL_FILES) diff --git a/src/crashreport.c b/src/crashreport.c index af217b5b8..533ff7c75 100644 --- a/src/crashreport.c +++ b/src/crashreport.c @@ -62,7 +62,7 @@ char *find_best_coredump(void) WIN32_FIND_DATA hData; HANDLE hFile; - hFile = FindFirstFile("wircd.*.core", &hData); + hFile = FindFirstFile("unrealircd.*.core", &hData); if (hFile == INVALID_HANDLE_VALUE) return NULL; @@ -307,7 +307,7 @@ int corefile_vs_binary_mismatch(char *coredump) return 0; /* GOOD! */ #else - return 0; /* guess we don't check this on Windows? Or will we check wircd.exe... hmm.. yeah maybe good idea */ + return 0; /* guess we don't check this on Windows? Or will we check UnrealIRCd.exe... hmm.. yeah maybe good idea */ #endif } diff --git a/src/ircd.c b/src/ircd.c index 098ae8eea..66a89d561 100644 --- a/src/ircd.c +++ b/src/ircd.c @@ -687,7 +687,7 @@ static int bad_command(const char *argv0) #else if (!IsService) { MessageBox(NULL, - "Usage: wircd [-h servername] [-p portnumber] [-x loglevel]\n", + "Usage: UnrealIRCd [-h servername] [-p portnumber] [-x loglevel]\n", "UnrealIRCD/32", MB_OK); } #endif @@ -780,7 +780,7 @@ static void do_version_check() version_check_logerror("Header<->library mismatches can make UnrealIRCd *CRASH*! " "Make sure you don't have multiple versions of openssl installed (eg: " "one in /usr and one in /usr/local). And, if you recently upgraded them, " - "be sure to recompile Unreal."); + "be sure to recompile UnrealIRCd."); #else version_check_logerror("Header<->library mismatches can make UnrealIRCd *CRASH*! " "This should never happen with official Windows builds... unless " @@ -956,7 +956,7 @@ static void generate_cloakkeys() #ifndef _WIN32 int main(int argc, char *argv[]) #else -int InitwIRCD(int argc, char *argv[]) +int InitUnrealIRCd(int argc, char *argv[]) #endif { #ifdef _WIN32 diff --git a/src/s_conf.c b/src/s_conf.c index d21a7c87f..53f14c353 100644 --- a/src/s_conf.c +++ b/src/s_conf.c @@ -1542,7 +1542,7 @@ void upgrade_conf_to_34(void) { config_error("We offer a configuration file converter to convert 3.2.x conf's to 4.0, however this " "is not available when running as a service. If you want to use it, make UnrealIRCd " - "run in GUI mode by running 'unreal uninstall'. Then start wircd.exe and when " + "run in GUI mode by running 'unreal uninstall'. Then start UnrealIRCd.exe and when " "it prompts you to convert the configuration click 'Yes'. Check if UnrealIRCd boots properly. " "Once everything is looking good you can run 'unreal install' to make UnrealIRCd run " "as a service again."); /* TODO: make this unnecessary :D */ diff --git a/src/win32/wircd.exe.manifest b/src/win32/UnrealIRCd.exe.manifest similarity index 100% rename from src/win32/wircd.exe.manifest rename to src/win32/UnrealIRCd.exe.manifest diff --git a/src/win32/Win32GUI.rc b/src/win32/Win32GUI.rc index 13460582e..bc5a2d3dc 100644 --- a/src/win32/Win32GUI.rc +++ b/src/win32/Win32GUI.rc @@ -30,7 +30,7 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US // Dialog // -WIRCD DIALOG DISCARDABLE 0, 0, 228, 127 +UNREALIRCD DIALOG DISCARDABLE 0, 0, 228, 127 STYLE DS_MODALFRAME | DS_3DLOOK | DS_NOFAILCREATE | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU FONT 8, "MS Sans Serif" @@ -193,7 +193,7 @@ END // 24 // -1 24 MOVEABLE PURE "wircd.exe.manifest" +1 24 MOVEABLE PURE "UnrealIRCd.exe.manifest" #ifdef APSTUDIO_INVOKED ///////////////////////////////////////////////////////////////////////////// @@ -233,7 +233,7 @@ END #ifdef APSTUDIO_INVOKED GUIDELINES DESIGNINFO DISCARDABLE BEGIN - "WIRCD", DIALOG + "UnrealIRCd", DIALOG BEGIN BOTTOMMARGIN, 126 END diff --git a/src/win32/debug.c b/src/win32/debug.c index 1f316f7a8..22912d576 100644 --- a/src/win32/debug.c +++ b/src/win32/debug.c @@ -227,7 +227,7 @@ void StartUnrealAgain(void) * Returns: * EXCEPTION_EXECUTE_HANDLER to terminate the process * Side Effects: - * wircd.PID.core is created + * unrealircd.PID.core is created * If not running in service mode, a message box is displayed, * else output is written to service.log */ @@ -242,7 +242,7 @@ LONG __stdcall ExceptionFilter(EXCEPTION_POINTERS *e) HMODULE hDll = NULL; #endif - sprintf(file, "wircd.%d.core", getpid()); + sprintf(file, "unrealircd.%d.core", getpid()); fd = fopen(file, "w"); GlobalMemoryStatus(&memStats); fprintf(fd, "Generated at %s\n%s (%d.%d.%d)\n%s[%s%s%s] (%s)\n" @@ -271,7 +271,7 @@ LONG __stdcall ExceptionFilter(EXCEPTION_POINTERS *e) if (pDump) { MINIDUMP_EXCEPTION_INFORMATION ExInfo; - sprintf(minidumpf, "wircd.%d.mdmp", getpid()); + sprintf(minidumpf, "unrealircd.%d.mdmp", getpid()); hDump = CreateFile(minidumpf, GENERIC_WRITE, FILE_SHARE_WRITE, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); if (hDump != INVALID_HANDLE_VALUE) { @@ -285,7 +285,7 @@ LONG __stdcall ExceptionFilter(EXCEPTION_POINTERS *e) } CloseHandle(hDump); } - sprintf(minidumpf, "wircd.%d.full.mdmp", getpid()); + sprintf(minidumpf, "unrealircd.%d.full.mdmp", getpid()); hDump = CreateFile(minidumpf, GENERIC_WRITE, FILE_SHARE_WRITE, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); if (hDump != INVALID_HANDLE_VALUE) { @@ -311,7 +311,7 @@ LONG __stdcall ExceptionFilter(EXCEPTION_POINTERS *e) if (fd) { fprintf(fd, "UnrealIRCd has encountered a fatal error. Debugging information " - "has been dumped to wircd.%d.core, please file a bug and upload " + "has been dumped to unrealircd.%d.core, please file a bug and upload " "this file to http://bugs.unrealircd.org/.", getpid()); fclose(fd); } diff --git a/src/win32/gui.c b/src/win32/gui.c index 9685f6c44..2bcc07aed 100644 --- a/src/win32/gui.c +++ b/src/win32/gui.c @@ -267,14 +267,14 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLi } hInst = hInstance; - hWnd = CreateDialog(hInstance, "WIRCD", 0, (DLGPROC)MainDLG); + hWnd = CreateDialog(hInstance, "UnrealIRCd", 0, (DLGPROC)MainDLG); hwIRCDWnd = hWnd; TaskBarCreated(); - if (InitwIRCD(__argc, __argv) != 1) + if (InitUnrealIRCd(__argc, __argv) != 1) { - MessageBox(NULL, "UnrealIRCd has failed to initialize in InitwIRCD()", "UnrealIRCD Initalization Error" ,MB_OK); + MessageBox(NULL, "UnrealIRCd has failed to initialize in InitUnrealIRCd()", "UnrealIRCD Initalization Error" ,MB_OK); return FALSE; } ShowWindow(hWnd, SW_SHOW); diff --git a/src/win32/service.c b/src/win32/service.c index bd4db05d1..69d115478 100644 --- a/src/win32/service.c +++ b/src/win32/service.c @@ -137,7 +137,7 @@ VOID WINAPI ServiceMain(DWORD dwArgc, LPTSTR *lpszArgv) } /* Initialize the IRCd */ - if ((error = InitwIRCD(dwArgc, lpszArgv)) != 1) + if ((error = InitUnrealIRCd(dwArgc, lpszArgv)) != 1) { SetServiceStop(error); return; diff --git a/src/win32/unrealinst.iss b/src/win32/unrealinst.iss index 97fe728b1..fee32deb6 100644 --- a/src/win32/unrealinst.iss +++ b/src/win32/unrealinst.iss @@ -35,8 +35,8 @@ Name: "enccert"; Description: "&Encrypt certificate"; GroupDescription: "SSL opt Name: "fixperm"; Description: "Make UnrealIRCd folder writable by current user"; [Files] -Source: "wircd.exe"; DestDir: "{app}"; Flags: ignoreversion -Source: "WIRCD.pdb"; DestDir: "{app}"; Flags: ignoreversion +Source: "UnrealIRCd.exe"; DestDir: "{app}"; Flags: ignoreversion +Source: "UnrealIRCd.pdb"; DestDir: "{app}"; Flags: ignoreversion Source: ".CHANGES.NEW"; DestDir: "{app}"; DestName: "CHANGES.NEW.txt";Flags: ignoreversion Source: "doc\RELEASE-NOTES"; DestDir: "{app}"; DestName: "RELEASE.NOTES.txt"; Flags: ignoreversion @@ -52,7 +52,7 @@ Source: "doc\*.*"; DestDir: "{app}\doc"; Flags: ignoreversion Source: "doc\technical\*.*"; DestDir: "{app}\doc\technical"; Flags: ignoreversion Source: "doc\conf\aliases\*"; DestDir: "{app}\conf\aliases"; Flags: ignoreversion -Source: "unreal.exe"; DestDir: "{app}"; Flags: ignoreversion; MinVersion: 0,4.0 +Source: "unrealsvc.exe"; DestDir: "{app}"; Flags: ignoreversion; MinVersion: 0,4.0 Source: "src\win32\makecert.bat"; DestDir: "{app}"; Flags: ignoreversion Source: "src\win32\encpem.bat"; DestDir: "{app}"; Flags: ignoreversion @@ -192,25 +192,25 @@ begin end; [Icons] -Name: "{group}\UnrealIRCd"; Filename: "{app}\wircd.exe"; WorkingDir: "{app}" +Name: "{group}\UnrealIRCd"; Filename: "{app}\UnrealIRCd.exe"; WorkingDir: "{app}" Name: "{group}\Uninstall UnrealIRCd"; Filename: "{uninstallexe}"; WorkingDir: "{app}" Name: "{group}\Make Certificate"; Filename: "{app}\makecert.bat"; WorkingDir: "{app}" Name: "{group}\Encrypt Certificate"; Filename: "{app}\encpem.bat"; WorkingDir: "{app}" Name: "{group}\Documentation"; Filename: "https://www.unrealircd.org/docs/UnrealIRCd_4_documentation"; WorkingDir: "{app}" -Name: "{userdesktop}\UnrealIRCd"; Filename: "{app}\wircd.exe"; WorkingDir: "{app}"; Tasks: desktopicon -Name: "{userappdata}\Microsoft\Internet Explorer\Quick Launch\UnrealIRCd"; Filename: "{app}\wircd.exe"; WorkingDir: "{app}"; Tasks: quicklaunchicon +Name: "{userdesktop}\UnrealIRCd"; Filename: "{app}\UnrealIRCd.exe"; WorkingDir: "{app}"; Tasks: desktopicon +Name: "{userappdata}\Microsoft\Internet Explorer\Quick Launch\UnrealIRCd"; Filename: "{app}\UnrealIRCd.exe"; WorkingDir: "{app}"; Tasks: quicklaunchicon [Run] ;Filename: "notepad"; Description: "View example.conf"; Parameters: "{app}\conf\examples\example.conf"; Flags: postinstall skipifsilent shellexec runmaximized Filename: "https://www.unrealircd.org/docs/UnrealIRCd_4_documentation"; Description: "View documentation"; Parameters: ""; Flags: postinstall skipifsilent shellexec runmaximized Filename: "https://www.unrealircd.org/docs/Installing_%28Windows%29"; Description: "View installation instructions"; Parameters: ""; Flags: postinstall skipifsilent shellexec runmaximized Filename: "notepad"; Description: "View Release Notes"; Parameters: "{app}\RELEASE.NOTES.txt"; Flags: postinstall skipifsilent shellexec runmaximized -Filename: "{app}\unreal.exe"; Parameters: "install"; Flags: runminimized nowait; Tasks: installservice -Filename: "{app}\unreal.exe"; Parameters: "config startup manual"; Flags: runminimized nowait; Tasks: installservice/startdemand -Filename: "{app}\unreal.exe"; Parameters: "config startup auto"; Flags: runminimized nowait; Tasks: installservice/startboot -Filename: "{app}\unreal.exe"; Parameters: "config crashrestart 2"; Flags: runminimized nowait; Tasks: installservice/crashrestart +Filename: "{app}\unrealsvc.exe"; Parameters: "install"; Flags: runminimized nowait; Tasks: installservice +Filename: "{app}\unrealsvc.exe"; Parameters: "config startup manual"; Flags: runminimized nowait; Tasks: installservice/startdemand +Filename: "{app}\unrealsvc.exe"; Parameters: "config startup auto"; Flags: runminimized nowait; Tasks: installservice/startboot +Filename: "{app}\unrealsvc.exe"; Parameters: "config crashrestart 2"; Flags: runminimized nowait; Tasks: installservice/crashrestart Filename: "{app}\makecert.bat"; Tasks: makecert; Flags: postinstall; Filename: "{app}\encpem.bat"; WorkingDir: "{app}"; Tasks: enccert; Flags: postinstall; [UninstallRun] -Filename: "{app}\unreal.exe"; Parameters: "uninstall"; Flags: runminimized; RunOnceID: "DelService"; Tasks: installservice +Filename: "{app}\unrealsvc.exe"; Parameters: "uninstall"; Flags: runminimized; RunOnceID: "DelService"; Tasks: installservice diff --git a/src/win32/unreal.c b/src/win32/unrealsvc.c similarity index 99% rename from src/win32/unreal.c rename to src/win32/unrealsvc.c index d85420b40..8dbf21b44 100644 --- a/src/win32/unreal.c +++ b/src/win32/unrealsvc.c @@ -64,7 +64,7 @@ int main(int argc, char *argv[]) { *bslash = 0; strcpy(binpath,path); - strcat(binpath, "\\wircd.exe"); + strcat(binpath, "\\UnrealIRCd.exe"); hService = CreateService(hSCManager, "UnrealIRCd", "UnrealIRCd", SERVICE_ALL_ACCESS, SERVICE_WIN32_OWN_PROCESS, SERVICE_AUTO_START, SERVICE_ERROR_NORMAL, binpath,