commit - e8668cf5933c7b0ababcca3d8171c765ec704504
commit + a89dc546902af4e394a2b4bf0b776898f6157374
blob - 398b62ade90ae492e0b46ba0d403b1e54e39c9aa
blob + fdb6fb60cf84e61eede71020d6b1837c2380bb27
--- MacOSX/ngircd.pbproj/project.pbxproj
+++ MacOSX/ngircd.pbproj/project.pbxproj
F5382426024F89BC01A85B04,
);
buildSettings = {
- OPTIMIZATION_CFLAGS = "";
OTHER_CFLAGS = "";
OTHER_LDFLAGS = "";
OTHER_REZFLAGS = "";
blob - ceadd32800c30a95add85dbf1bb30cb9c11da0e3
blob + 4291c79f9d1a9ca53cb4778ef0923e2f06180358
--- src/ngircd/ngircd.c
+++ src/ngircd/ngircd.c
* Naehere Informationen entnehmen Sie bitter der Datei COPYING. Eine Liste
* der an ngIRCd beteiligten Autoren finden Sie in der Datei AUTHORS.
*
- * $Id: ngircd.c,v 1.35 2002/03/25 19:11:01 alex Exp $
+ * $Id: ngircd.c,v 1.36 2002/03/27 16:41:25 alex Exp $
*
* ngircd.c: Hier beginnt alles ;-)
*/
GLOBAL int main( int argc, const char *argv[] )
{
- BOOLEAN ok;
+ BOOLEAN ok, configtest = FALSE;
INT32 pid, n;
INT i;
#ifdef SNIFFER
NGIRCd_Sniffer = FALSE;
#endif
+ strcpy( NGIRCd_ConfFile, CONFIG_FILE );
/* Kommandozeile parsen */
for( i = 1; i < argc; i++ )
{
/* Lange Option */
+ if( strcmp( argv[i], "--configtest" ) == 0 )
+ {
+ configtest = TRUE;
+ ok = TRUE;
+ }
#ifdef DEBUG
if( strcmp( argv[i], "--debug" ) == 0 )
{
#endif
if( strcmp( argv[i], "--help" ) == 0 )
{
- Show_Version( ); puts( "" );
- Show_Help( ); puts( "" );
+ Show_Version( );
+ puts( "" ); Show_Help( ); puts( "" );
exit( 1 );
}
if( strcmp( argv[i], "--nodaemon" ) == 0 )
#ifdef SNIFFER
if( NGIRCd_Sniffer ) strcpy( NGIRCd_DebugLevel, "2" );
#endif
+
+ /* Soll nur die Konfigurations ueberprueft und ausgegeben werden? */
+ if( configtest )
+ {
+ Show_Version( ); puts( "" );
+ exit( Conf_Test( ));
+ }
while( ! NGIRCd_Quit )
{
LOCAL VOID Show_Help( VOID )
{
- puts( "Compile-time defaults:\n" );
- puts( " - configuration: "CONFIG_FILE );
- puts( " - MOTD file: "MOTD_FILE );
- puts( " - server error log: "ERROR_FILE"\n" );
- puts( "Run-time options:\n" );
#ifdef DEBUG
puts( " -d, --debug log extra debug messages" );
#endif
#ifdef SNIFFER
puts( " -s, --sniffer enable network sniffer and display all IRC traffic" );
#endif
+ puts( " --configtest read, validate and display configuration; then exit" );
puts( " --version output version information and exit" );
puts( " --help display this help and exit" );
} /* Show_Help */