- if( NGIRCd_VersionAddition[0] )
- strlcat( NGIRCd_VersionAddition, "-", sizeof( NGIRCd_VersionAddition ));
-
- strlcat( NGIRCd_VersionAddition, TARGET_CPU, sizeof( NGIRCd_VersionAddition ));
- strlcat( NGIRCd_VersionAddition, "/", sizeof( NGIRCd_VersionAddition ));
- strlcat( NGIRCd_VersionAddition, TARGET_VENDOR, sizeof( NGIRCd_VersionAddition ));
- strlcat( NGIRCd_VersionAddition, "/", sizeof( NGIRCd_VersionAddition ));
- strlcat( NGIRCd_VersionAddition, TARGET_OS, sizeof( NGIRCd_VersionAddition ));
-
- snprintf(NGIRCd_Version, sizeof NGIRCd_Version, "%s %s-%s",
- PACKAGE_NAME, PACKAGE_VERSION, NGIRCd_VersionAddition);
- } /* Fill_Version */
-
-
-/**
- * Reload the server configuration file.
- */
-GLOBAL void
-NGIRCd_Rehash( void )
-{
- char old_name[CLIENT_ID_LEN];
- unsigned old_nicklen;
-
- Log( LOG_NOTICE|LOG_snotice, "Re-reading configuration NOW!" );
- NGIRCd_SignalRehash = false;
-
- /* Remember old server name and nick name length */
- strlcpy( old_name, Conf_ServerName, sizeof old_name );
- old_nicklen = Conf_MaxNickLength;
-
- /* Re-read configuration ... */
- if (!Conf_Rehash( ))
- return;
-
- /* Close down all listening sockets */
- Conn_ExitListeners( );
-
- /* Recover old server name and nick name length: these values can't
- * be changed during run-time */
- if (strcmp(old_name, Conf_ServerName) != 0 ) {
- strlcpy(Conf_ServerName, old_name, sizeof Conf_ServerName);
- Log(LOG_ERR, "Can't change \"ServerName\" on runtime! Ignored new name.");
- }
- if (old_nicklen != Conf_MaxNickLength) {
- Conf_MaxNickLength = old_nicklen;
- Log(LOG_ERR, "Can't change \"MaxNickLength\" on runtime! Ignored new value.");
- }
-
- /* Create new pre-defined channels */
- Channel_InitPredefined( );
-
- /* Start listening on sockets */
- Conn_InitListeners( );
-
- /* Sync configuration with established connections */
- Conn_SyncServerStruct( );
-
- Log( LOG_NOTICE|LOG_snotice, "Re-reading of configuration done." );
-} /* NGIRCd_Rehash */
-
-
-/**
- * Initialize the signal handler.
- */
-static void
-Initialize_Signal_Handler( void )
-{
- /* Signal-Handler initialisieren: einige Signale
- * werden ignoriert, andere speziell behandelt. */
-
-#ifdef HAVE_SIGACTION
- /* sigaction() ist vorhanden */
-
- struct sigaction saction;
-
- /* Signal-Struktur initialisieren */
- memset( &saction, 0, sizeof( saction ));
- saction.sa_handler = Signal_Handler;
-#ifdef SA_RESTART
- saction.sa_flags |= SA_RESTART;