+ if( strcmp( argv[i], "--config" ) == 0 )
+ {
+ if( i + 1 < argc )
+ {
+ /* Ok, danach kommt noch ein Parameter */
+ strncpy( NGIRCd_ConfFile, argv[i + 1], FNAME_LEN - 1 );
+ NGIRCd_ConfFile[FNAME_LEN - 1] = '\0';
+
+ /* zum uebernaechsten Parameter */
+ i++; ok = TRUE;
+ }
+ }
+ if( strcmp( argv[i], "--configtest" ) == 0 )
+ {
+ configtest = TRUE;
+ ok = TRUE;
+ }
+#ifdef DEBUG
+ if( strcmp( argv[i], "--debug" ) == 0 )
+ {
+ NGIRCd_Debug = TRUE;
+ ok = TRUE;
+ }
+#endif
+ if( strcmp( argv[i], "--help" ) == 0 )
+ {
+ Show_Version( );
+ puts( "" ); Show_Help( ); puts( "" );
+ exit( 1 );
+ }
+ if( strcmp( argv[i], "--nodaemon" ) == 0 )
+ {
+ NGIRCd_NoDaemon = TRUE;
+ ok = TRUE;
+ }
+ if( strcmp( argv[i], "--passive" ) == 0 )
+ {
+ NGIRCd_Passive = TRUE;
+ ok = TRUE;
+ }
+#ifdef SNIFFER
+ if( strcmp( argv[i], "--sniffer" ) == 0 )
+ {
+ NGIRCd_Sniffer = TRUE;
+ ok = TRUE;
+ }
+#endif
+ if( strcmp( argv[i], "--version" ) == 0 )
+ {
+ Show_Version( );
+ exit( 1 );
+ }
+ }
+ else if(( argv[i][0] == '-' ) && ( argv[i][1] != '-' ))
+ {
+ /* Kurze Option */
+
+ for( n = 1; n < (INT32)strlen( argv[i] ); n++ )
+ {
+ ok = FALSE;
+#ifdef DEBUG
+ if( argv[i][n] == 'd' )
+ {
+ NGIRCd_Debug = TRUE;
+ ok = TRUE;
+ }
+#endif
+ if( argv[i][n] == 'f' )
+ {
+ if(( ! argv[i][n+i] ) && ( i + 1 < argc ))
+ {
+ /* Ok, danach kommt ein Leerzeichen */
+ strncpy( NGIRCd_ConfFile, argv[i + 1], FNAME_LEN - 1 );
+ NGIRCd_ConfFile[FNAME_LEN - 1] = '\0';
+
+ /* zum uebernaechsten Parameter */
+ i++; n = strlen( argv[i] );
+ ok = TRUE;
+ }
+ }
+ if( argv[i][n] == 'n' )
+ {
+ NGIRCd_NoDaemon = TRUE;
+ ok = TRUE;
+ }
+ if( argv[i][n] == 'p' )
+ {
+ NGIRCd_Passive = TRUE;
+ ok = TRUE;
+ }
+#ifdef SNIFFER
+ if( argv[i][n] == 's' )
+ {
+ NGIRCd_Sniffer = TRUE;
+ ok = TRUE;
+ }
+#endif
+
+ if( ! ok )
+ {
+ printf( PACKAGE": invalid option \"-%c\"!\n", argv[i][n] );
+ puts( "Try \""PACKAGE" --help\" for more information." );
+ exit( 1 );
+ }
+ }
+
+ }
+ if( ! ok )
+ {
+ printf( PACKAGE": invalid option \"%s\"!\n", argv[i] );
+ puts( "Try \""PACKAGE" --help\" for more information." );
+ exit( 1 );
+ }
+ }
+
+ /* Debug-Level (fuer IRC-Befehl "VERSION") ermitteln */
+ strcpy( NGIRCd_DebugLevel, "" );
+#ifdef DEBUG
+ if( NGIRCd_Debug ) strcpy( NGIRCd_DebugLevel, "1" );
+#endif
+#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( ));
+ }