]> arthur.barton.de Git - ngircd-alex.git/blobdiff - src/ngircd/ngircd.c
IPv6: Add config options to disabe ipv4/ipv6 support.
[ngircd-alex.git] / src / ngircd / ngircd.c
index d2a6d7ea8faae860f0df893edef82969acf80a3b..5b872fc52a309b498f58935001d1dd040b42e803 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * ngIRCd -- The Next Generation IRC Daemon
- * Copyright (c)2001-2007 Alexander Barton (alex@barton.de).
+ * Copyright (c)2001-2008 Alexander Barton (alex@barton.de).
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -12,8 +12,6 @@
 
 #include "portab.h"
 
-static char UNUSED id[] = "$Id: ngircd.c,v 1.117 2007/11/21 12:16:36 alex Exp $";
-
 /**
  * @file
  * The main program, including the C function main() which is called
@@ -397,7 +395,12 @@ Fill_Version( void )
 
        strlcat( NGIRCd_VersionAddition, "IRCPLUS", sizeof NGIRCd_VersionAddition );
 #endif
+#ifdef WANT_IPV6
+       if (NGIRCd_VersionAddition[0])
+               strlcat(NGIRCd_VersionAddition, "+", sizeof(NGIRCd_VersionAddition));
 
+       strlcat(NGIRCd_VersionAddition, "IPv6", sizeof(NGIRCd_VersionAddition));
+#endif
        if( NGIRCd_VersionAddition[0] )
                strlcat( NGIRCd_VersionAddition, "-", sizeof( NGIRCd_VersionAddition ));
 
@@ -427,15 +430,16 @@ NGIRCd_Rehash( void )
        Log( LOG_NOTICE|LOG_snotice, "Re-reading configuration NOW!" );
        NGIRCd_SignalRehash = false;
 
-       /* Close down all listening sockets */
-       Conn_ExitListeners( );
-
        /* Remember old server name and nick name length */
        strlcpy( old_name, Conf_ServerName, sizeof old_name );
        old_nicklen = Conf_MaxNickLength;
 
        /* Re-read configuration ... */
-       Conf_Rehash( );
+       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 */
@@ -552,7 +556,7 @@ static void
 Show_Version( void )
 {
        puts( NGIRCd_Version );
-       puts( "Copyright (c)2001-2007 Alexander Barton (<alex@barton.de>) and Contributors." );
+       puts( "Copyright (c)2001-2008 Alexander Barton (<alex@barton.de>) and Contributors." );
        puts( "Homepage: <http://ngircd.barton.de/>\n" );
        puts( "This is free software; see the source for copying conditions. There is NO" );
        puts( "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." );