? .hg
? 2010.08.03
? aclocal.m4
? autom4te.cache
? bcn.ircd.motd
? cache
? config.settings.bac
? config.settings.system
? ircd.log
? ircd.pid
? ircd.tune
? location.conf
? motd.txt
? nopost-1.1
? nopost.tar.gz
? patch1.patch
? robots.txt
? server.cert.pem
? server.key.pem
? server.req.pem
? smotd.txt
? tmp
? unrealircd.conf
? valgrind.unreal.suppress
? autoconf/acinclude.m4
? doc/AntiRandom
? extras/c-ares
? extras/c-ares-1.6.0
? extras/c-ares-1.7.3
? extras/c-ares-1.7.3.tar.gz.asc
? extras/c-ares.tar
? extras/regexp
? extras/tre-0.7.5
? extras/tre-0.8.0
? extras/tre.tar
? ircdcron/ircd.cron
? src/modules/antirandom.c
? src/modules/callerid.c
? src/modules/m_dnsbl.c
? src/modules/m_dnsbl.tar.gz
? src/modules/m_soper.c
? src/modules/testchanmodehook.c
Index: src/ircd.c
===================================================================
RCS file: /cvs/unreal/src/ircd.c,v
retrieving revision 1.1.1.1.6.1.2.190.2.53
diff -u -B -r1.1.1.1.6.1.2.190.2.53 ircd.c
--- src/ircd.c	20 Aug 2010 12:16:40 -0000	1.1.1.1.6.1.2.190.2.53
+++ src/ircd.c	25 Aug 2010 04:24:51 -0000
@@ -755,11 +755,30 @@
 **	This is called when the commandline is not acceptable.
 **	Give error message and exit without starting anything.
 */
-static int bad_command(void)
+static int bad_command(const char *argv0)
 {
 #ifndef _WIN32
+	if (!argv0)
+		argv0 = "ircd";
+
 	(void)printf
-	    ("Usage: ircd [-f config] [-h servername] [-p portnumber] [-x loglevel] [-t] [-H]\n");
+	    ("Usage: %s [-f <config>] [-h <servername>] [-p <port>] [-x <loglevel>] [-t] [-F]\n"
+	     "\n"
+	     "UnrealIRCd\n"
+	     " -f <config>     Load configuration from <config> instead of the default\n"
+	     "                 (%s).\n"
+	     " -h <servername> Override the me::name configuration setting with\n"
+	     "                 <servername>.\n"
+	     " -p <port>       Listen on <port> in addition to the ports specified by\n"
+	     "                 the listen blocks.\n"
+	     " -x <loglevel>   Set the log level to <loglevel>.\n"
+	     " -t              Dump information to stdout as if you were a linked-in\n"
+	     "                 server.\n"
+	     " -F              Don't fork() when starting up. Use this when running\n"
+	     "                 UnrealIRCd under gdb or when playing around with settings\n"
+	     "                 on a non-production setup.\n"
+	     "\n",
+	     argv0, CONFIGFILE);
 	(void)printf("Server not started\n\n");
 #else
 	if (!IsService) {
@@ -1363,7 +1382,11 @@
 			  exit(0);
 #endif
 		  default:
-			  return bad_command();
+#ifndef _WIN32
+			  return bad_command(myargv[0]);
+#else
+			  return bad_command(NULL);
+#endif
 			  break;
 		}
 	}
@@ -1414,7 +1437,7 @@
 	 */
 #ifndef _WIN32
 	if (argc > 0)
-		return bad_command();	/* This should exit out */
+		return bad_command(myargv[0]);	/* This should exit out */
 #endif
 #ifndef _WIN32
 	fprintf(stderr, "%s", unreallogo);
