]> jfr.im git - solanum.git/blobdiff - ircd/ircd.c
Resolve shfit/reduce conflict in timespec production (#54)
[solanum.git] / ircd / ircd.c
index 6c92a5b709c6ffdc90255f435d64db45e5061efe..935aa4e9671fa067ba2d6101be9db175618df058 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *  charybdis: A slightly useful ircd.
+ *  Solanum: a slightly advanced ircd
  *  ircd.c: Starts up and runs the ircd.
  *
  *  Copyright (C) 1990 Jarkko Oikarinen and University of Oulu, Co Center
@@ -206,7 +206,7 @@ init_sys(void)
                if(maxconnections <= MAX_BUFFER)
                {
                        fprintf(stderr, "ERROR: Shell FD limits are too low.\n");
-                       fprintf(stderr, "ERROR: charybdis reserves %d FDs, shell limits must be above this\n", MAX_BUFFER);
+                       fprintf(stderr, "ERROR: solanum reserves %d FDs, shell limits must be above this\n", MAX_BUFFER);
                        exit(EXIT_FAILURE);
                }
                return;
@@ -553,7 +553,7 @@ ircd_restart_cb(const char *str)
 /*
  * Why EXIT_FAILURE here?
  * Because if ircd_die_cb() is called it's because of a fatal
- * error inside libcharybdis, and we don't know how to handle the
+ * error inside libsolanum, and we don't know how to handle the
  * exception, so it is logical to return a FAILURE exit code here.
  *    --nenolod
  */
@@ -627,7 +627,7 @@ seed_random(void *unused)
  * Side Effects - this is where the ircd gets going right now
  */
 int
-charybdis_main(int argc, char * const argv[])
+solanum_main(int argc, char * const argv[])
 {
        int fd;
 
@@ -679,6 +679,7 @@ charybdis_main(int argc, char * const argv[])
        me.localClient = &meLocalUser;
 
        /* Make sure all lists are zeroed */
+       memset(&global_client_list, 0, sizeof(global_client_list));
        memset(&unknown_list, 0, sizeof(unknown_list));
        memset(&lclient_list, 0, sizeof(lclient_list));
        memset(&serv_list, 0, sizeof(serv_list));
@@ -725,13 +726,13 @@ charybdis_main(int argc, char * const argv[])
        {
                check_pidfile(pidFileName);
 
+               inotice("starting %s ...", ircd_version);
+               inotice("%s", rb_lib_version());
+
 #ifndef _WIN32
                if(!server_state_foreground)
                        make_daemon();
 #endif
-
-               inotice("starting %s ...", ircd_version);
-               inotice("%s", rb_lib_version());
        }
 
        /* Init the event subsystem */
@@ -823,13 +824,6 @@ charybdis_main(int argc, char * const argv[])
                        ircd_ssl_ok = true;
        }
 
-       if (testing_conf)
-       {
-               fprintf(stderr, "\nConfig testing complete.\n");
-               fflush(stderr);
-               return 0;       /* Why? We want the launcher to exit out. */
-       }
-
        me.from = &me;
        me.servptr = &me;
        SetMe(&me);
@@ -843,6 +837,13 @@ charybdis_main(int argc, char * const argv[])
 
        construct_umodebuf();
 
+       if (testing_conf)
+       {
+               fprintf(stderr, "\nConfig testing complete.\n");
+               fflush(stderr);
+               return 0;       /* Why? We want the launcher to exit out. */
+       }
+
        check_class();
        write_pidfile(pidFileName);
        load_help();