From a7ee96c3cef0732897be8b4d74df1d7a59f73620 Mon Sep 17 00:00:00 2001 From: codemastr Date: Sat, 2 Sep 2000 16:32:28 +0000 Subject: [PATCH] fixed a bug when running the ircd with -h --- Changes | 1 + TODO | 1 - src/ircd.c | 6 +++++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Changes b/Changes index e46c01510..2e3315b98 100644 --- a/Changes +++ b/Changes @@ -600,3 +600,4 @@ - Made aClient->passwd dynamically allocated (saves 32bytes per user/server) [may need debugging] - Fixed a NOTICE crash bug, reported by EJ - Removed a excessive va_end in send.c +- Fixed a bug when running the ircd with -h diff --git a/TODO b/TODO index b561d26d6..950cc3c2e 100644 --- a/TODO +++ b/TODO @@ -49,7 +49,6 @@ Assigned to DrBin: * Port to BeOS * +N (no nickname changes chmode) * Chmodes in /list possbility -* Make cached MOTDs more memory friendly (dynamic allocation) * Fix up the flag and proto system * Make a is_chan_op, is_chanprot, is_chanowner all-in-one function * Split up Link (SLink) diff --git a/src/ircd.c b/src/ircd.c index 3a01f2a20..223102541 100644 --- a/src/ircd.c +++ b/src/ircd.c @@ -808,6 +808,10 @@ int InitwIRCD(argc, argv) break; #endif case 'h': + if (!strchr(p, '.')) { + (void)printf("ERROR: %s is not valid: Server names must contain at least 1 \".\"\n", p); + exit(1); + } strncpyzt(me.name, p, sizeof(me.name)); break; case 'H': @@ -841,7 +845,7 @@ int InitwIRCD(argc, argv) bootopt |= BOOT_TTY; break; case 'v': - (void)printf("ircd %s\n", version); + (void)printf("%s\n", version); #else case 'v': MessageBox(NULL, version, "UnrealIRCD/Win32 version",