+ CHAR txt[127];
+
+#ifdef USE_SYSLOG
+ /* Syslog initialisieren */
+ openlog( PACKAGE, LOG_CONS|LOG_PID, LOG_LOCAL5 );
+#endif
+
+ /* Hello World! */
+ Log( LOG_NOTICE, "%s started.", NGIRCd_Version( ));
+
+ /* Informationen uebern den "Operation Mode" */
+ strcpy( txt, "" );
+#ifdef DEBUG
+ if( NGIRCd_Debug )
+ {
+ if( txt[0] ) strcat( txt, ", " );
+ strcat( txt, "debug-mode" );
+ }
+#endif
+ if( NGIRCd_NoDaemon )
+ {
+ if( txt[0] ) strcat( txt, ", " );
+ strcat( txt, "no-daemon-mode" );
+ }
+ if( NGIRCd_Passive )
+ {
+ if( txt[0] ) strcat( txt, ", " );
+ strcat( txt, "passive-mode" );
+ }
+#ifdef SNIFFER
+ if( NGIRCd_Sniffer )
+ {
+ if( txt[0] ) strcat( txt, ", " );
+ strcat( txt, "network sniffer" );
+ }
+#endif
+ if( txt[0] ) Log( LOG_INFO, "Activating: %s.", txt );
+
+ /* stderr in Datei umlenken */
+ sprintf( Error_File, ERROR_DIR"/"PACKAGE"-%ld.err", (INT32)getpid( ));
+ fflush( stderr );
+ if( ! freopen( Error_File, "a+", stderr )) Log( LOG_ERR, "Can't reopen stderr (\"%s\"): %s", Error_File, strerror( errno ));
+
+ fprintf( stderr, "\n--- %s ---\n\n", NGIRCd_StartStr );
+ fprintf( stderr, "%s started.\npid=%ld, ppid=%ld, uid=%ld, gid=%ld [euid=%ld, egid=%ld].\nActivating: %s\n\n", NGIRCd_Version( ), (INT32)getpid( ), (INT32)getppid( ), (INT32)getuid( ), (INT32)getgid( ), (INT32)geteuid( ), (INT32)getegid( ), txt[0] ? txt : "-" );
+ fflush( stderr );