]> arthur.barton.de Git - ngircd.git/blobdiff - src/ngircd/ngircd.c
Split NoSyslog from behaviour of NoDaemon
[ngircd.git] / src / ngircd / ngircd.c
index 72c0d8095adf5e335551ffa314a375b08e6d15d8..9f77f302db49c608c0bbb28893cb64f7c0d845f1 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * ngIRCd -- The Next Generation IRC Daemon
- * Copyright (c)2001-2021 Alexander Barton (alex@barton.de) and Contributors.
+ * Copyright (c)2001-2022 Alexander Barton (alex@barton.de) and Contributors.
  *
  * 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
@@ -74,7 +74,7 @@ GLOBAL int
 main(int argc, const char *argv[])
 {
        bool ok, configtest = false;
-       bool NGIRCd_NoDaemon = false;
+       bool NGIRCd_NoDaemon = false, NGIRCd_NoSyslog = false;
        int i;
        size_t n;
 
@@ -130,6 +130,7 @@ main(int argc, const char *argv[])
                        }
                        if (strcmp(argv[i], "--nodaemon") == 0) {
                                NGIRCd_NoDaemon = true;
+                               NGIRCd_NoSyslog = true;
                                ok = true;
                        }
                        if (strcmp(argv[i], "--passive") == 0) {
@@ -178,6 +179,7 @@ main(int argc, const char *argv[])
 
                                if (argv[i][n] == 'n') {
                                        NGIRCd_NoDaemon = true;
+                                       NGIRCd_NoSyslog = true;
                                        ok = true;
                                }
                                if (argv[i][n] == 'p') {
@@ -249,7 +251,7 @@ main(int argc, const char *argv[])
                NGIRCd_SignalRestart = false;
                NGIRCd_SignalQuit = false;
 
-               Log_Init(!NGIRCd_NoDaemon);
+               Log_Init(!NGIRCd_NoSyslog);
                Random_Init();
                Conf_Init();
                Log_ReInit();
@@ -451,7 +453,7 @@ static void
 Show_Version( void )
 {
        puts( NGIRCd_Version );
-       puts( "Copyright (c)2001-2021 Alexander Barton (<alex@barton.de>) and Contributors." );
+       puts( "Copyright (c)2001-2022 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." );