]> arthur.barton.de Git - ngircd-alex.git/blobdiff - src/ngircd/ngircd.c
- new (and much more flexible!) MODE parser
[ngircd-alex.git] / src / ngircd / ngircd.c
index 37cc97fc5d97fe71809f292cd06af1c3393efc59..1396d9ed706f08da5e5cba9eaf1087f07e1272be 100644 (file)
@@ -2,21 +2,20 @@
  * ngIRCd -- The Next Generation IRC Daemon
  * Copyright (c)2001,2002 by Alexander Barton (alex@barton.de)
  *
- * Dieses Programm ist freie Software. Sie koennen es unter den Bedingungen
- * der GNU General Public License (GPL), wie von der Free Software Foundation
- * herausgegeben, weitergeben und/oder modifizieren, entweder unter Version 2
- * der Lizenz oder (wenn Sie es wuenschen) jeder spaeteren Version.
- * Naehere Informationen entnehmen Sie bitter der Datei COPYING. Eine Liste
- * der an ngIRCd beteiligten Autoren finden Sie in der Datei AUTHORS.
+ * 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
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ * Please read the file COPYING, README and AUTHORS for more information.
  *
- * $Id: ngircd.c,v 1.60 2002/11/22 17:59:43 alex Exp $
- *
- * ngircd.c: Hier beginnt alles ;-)
+ * Main program -- main()
  */
 
 
 #include "portab.h"
 
+static char UNUSED id[] = "$Id: ngircd.c,v 1.64 2002/12/12 11:31:21 alex Exp $";
+
 #include "imp.h"
 #include <assert.h>
 #include <errno.h>
@@ -294,11 +293,17 @@ main( int argc, const char *argv[] )
                 * sind in doc/Protocol.txt beschrieben. */
 #ifdef IRCPLUS
                sprintf( NGIRCd_ProtoID, "%s%s %s|%s:%s", PROTOVER, PROTOIRCPLUS, PACKAGE, VERSION, IRCPLUSFLAGS );
+#ifdef USE_ZLIB
+               strcat( NGIRCd_ProtoID, "Z" );
+#endif
                if( Conf_OperCanMode ) strcat( NGIRCd_ProtoID, "o" );
 #else
                sprintf( NGIRCd_ProtoID, "%s%s %s|%s", PROTOVER, PROTOIRC, PACKAGE, VERSION );
 #endif
                strcat( NGIRCd_ProtoID, " P" );
+#ifdef USE_ZLIB
+               strcat( NGIRCd_ProtoID, "Z" );
+#endif
                Log( LOG_DEBUG, "Protocol and server ID is \"%s\".", NGIRCd_ProtoID );
 
                /* Vordefinierte Channels anlegen */
@@ -352,6 +357,10 @@ NGIRCd_VersionAddition( VOID )
        if( txt[0] ) strcat( txt, "+" );
        strcat( txt, "SYSLOG" );
 #endif
+#ifdef USE_ZLIB
+       if( txt[0] ) strcat( txt, "+" );
+       strcat( txt, "ZLIB" );
+#endif
 #ifdef DEBUG
        if( txt[0] ) strcat( txt, "+" );
        strcat( txt, "DEBUG" );
@@ -381,7 +390,7 @@ NGIRCd_VersionAddition( VOID )
 
 
 GLOBAL VOID
-NGIRCd_Reload( VOID )
+NGIRCd_Rehash( VOID )
 {
        CHAR old_name[CLIENT_ID_LEN];
        
@@ -409,7 +418,7 @@ NGIRCd_Reload( VOID )
        Conn_InitListeners( );
 
        Log( LOG_INFO, "Re-reading of configuration done." );
-} /* NGIRCd_Reload */
+} /* NGIRCd_Rehash */
 
 
 LOCAL VOID
@@ -480,7 +489,7 @@ Signal_Handler( INT Signal )
                case SIGHUP:
                        /* Konfiguration neu einlesen: */
                        Log( LOG_WARNING|LOG_snotice, "Got HUP signal, re-reading configuration ..." );
-                       NGIRCd_Reload( );
+                       NGIRCd_Rehash( );
                        break;
                case SIGCHLD:
                        /* Child-Prozess wurde beendet. Zombies vermeiden: */