+ NGIRCd_Restart = FALSE;
+ NGIRCd_Quit = FALSE;
+ NGIRCd_NoDaemon = FALSE;
+ NGIRCd_Passive = FALSE;
+#ifdef DEBUG
+ NGIRCd_Debug = FALSE;
+#endif
+#ifdef SNIFFER
+ NGIRCd_Sniffer = FALSE;
+#endif
+
+ /* Kommandozeile parsen */
+ for( i = 1; i < argc; i++ )
+ {
+ ok = FALSE;
+ if(( argv[i][0] == '-' ) && ( argv[i][1] == '-' ))
+ {
+ /* Lange Option */
+
+#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 < strlen( argv[i] ); n++ )
+ {
+ ok = FALSE;
+#ifdef DEBUG
+ if( argv[i][n] == 'd' )
+ {
+ NGIRCd_Debug = TRUE;
+ ok = TRUE;
+ }
+#endif
+ 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
+