]> arthur.barton.de Git - ngircd-alex.git/blobdiff - src/ngircd/ngircd.c
- neue Funktionen Channel_ModeAdd(), Channel_ModeDel(), Channel_UserModes(),
[ngircd-alex.git] / src / ngircd / ngircd.c
index 6add9fb7dae784b6fb913c0666f8a56f4759dea9..3c30391ab81fd4b3d03cdcb345e5439da107b1a6 100644 (file)
@@ -9,11 +9,20 @@
  * 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.19 2002/01/12 00:17:28 alex Exp $
+ * $Id: ngircd.c,v 1.22 2002/01/22 17:15:39 alex Exp $
  *
  * ngircd.c: Hier beginnt alles ;-)
  *
  * $Log: ngircd.c,v $
+ * Revision 1.22  2002/01/22 17:15:39  alex
+ * - die Fehlermeldung "interrupted system call" sollte nicht mehr auftreten.
+ *
+ * Revision 1.21  2002/01/21 00:02:11  alex
+ * - Hilfetexte korrigiert und ergaenzt (Sniffer).
+ *
+ * Revision 1.20  2002/01/18 11:12:11  alex
+ * - der Sniffer wird nun nur noch aktiviert, wenn auf Kommandozeile angegeben.
+ *
  * Revision 1.19  2002/01/12 00:17:28  alex
  * - ngIRCd wandelt sich nun selber in einen Daemon (Hintergrundprozess) um.
  *
@@ -130,6 +139,9 @@ GLOBAL INT main( INT argc, CONST CHAR *argv[] )
 #ifdef DEBUG
        NGIRCd_Debug = FALSE;
 #endif
+#ifdef SNIFFER
+       NGIRCd_Sniffer = FALSE;
+#endif
 
        /* Kommandozeile parsen */
        for( i = 1; i < argc; i++ )
@@ -156,6 +168,13 @@ GLOBAL INT main( INT argc, CONST CHAR *argv[] )
                                NGIRCd_Debug = TRUE;
                                ok = TRUE;
                        }
+#endif
+#ifdef SNIFFER
+                       if( strcmp( argv[i], "--sniffer" ) == 0 )
+                       {
+                               NGIRCd_Sniffer = TRUE;
+                               ok = TRUE;
+                       }
 #endif
                        if( strcmp( argv[i], "--nodaemon" ) == 0 )
                        {
@@ -176,6 +195,13 @@ GLOBAL INT main( INT argc, CONST CHAR *argv[] )
                                        NGIRCd_Debug = TRUE;
                                        ok = TRUE;
                                }
+#endif
+#ifdef SNIFFER
+                               if( argv[i][n] == 's' )
+                               {
+                                       NGIRCd_Sniffer = TRUE;
+                                       ok = TRUE;
+                               }
 #endif
                                if( argv[i][n] == 'n' )
                                {
@@ -308,9 +334,10 @@ LOCAL VOID Initialize_Signal_Handler( VOID )
 
        /* Signal-Struktur initialisieren */
        memset( &saction, 0, sizeof( saction ));
+       saction.sa_handler = Signal_Handler;
+       saction.sa_flags = SA_RESTART;
 
        /* Signal-Handler einhaengen */
-       saction.sa_handler = Signal_Handler;
        sigaction( SIGINT, &saction, NULL );
        sigaction( SIGQUIT, &saction, NULL );
        sigaction( SIGTERM, &saction, NULL);
@@ -386,8 +413,11 @@ LOCAL VOID Show_Help( VOID )
        puts( "  -d, --debug       log extra debug messages" );
 #endif
         puts( "  -n, --nodaemon    don't fork and don't detatch from controlling terminal" );
-       puts( "      --version     display this help and exit" );
-       puts( "      --help        output version information and exit" );
+#ifdef SNIFFER
+       puts( "  -s, --sniffer     enable network sniffer and display all IRC traffic" );
+#endif
+       puts( "      --version     output version information and exit" );
+       puts( "      --help        display this help and exit" );
 } /* Show_Help */