From 417432f2be811573326b8366783020fa1fd63eec Mon Sep 17 00:00:00 2001 From: brain Date: Wed, 14 Dec 2005 17:53:32 +0000 Subject: TittyBiscuits! git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2429 e03df62e-2008-0410-955e-edbf42e46eb7 --- include/ctables.h | 1 - include/inspircd.h | 1 - src/inspircd.cpp | 65 +++++++++++++++++++++++++++--------------------------- 3 files changed, 32 insertions(+), 35 deletions(-) diff --git a/include/ctables.h b/include/ctables.h index a16f5732f..5926f3a2a 100644 --- a/include/ctables.h +++ b/include/ctables.h @@ -20,7 +20,6 @@ #include "inspircd_config.h" #include "inspircd.h" #include "base.h" -#include "typedefs.h" /** A structure that defines a command */ diff --git a/include/inspircd.h b/include/inspircd.h index 807b6cbaf..1eece0532 100644 --- a/include/inspircd.h +++ b/include/inspircd.h @@ -42,7 +42,6 @@ #include "inspircd_util.h" #include "users.h" #include "channels.h" -#include "typedefs.h" // some misc defines diff --git a/src/inspircd.cpp b/src/inspircd.cpp index 60e0c11bd..4cab20c52 100644 --- a/src/inspircd.cpp +++ b/src/inspircd.cpp @@ -468,6 +468,38 @@ InspIRCd::InspIRCd(int argc, char** argv) lowermap[(unsigned)']'] = '}'; lowermap[(unsigned)'\\'] = '|'; + + OpenLog(argc, argv); + Config->ClearStack(); + Config->Read(true,NULL); + CheckRoot(); + SetupCommandTable(); + AddServerName(Config->ServerName); + CheckDie(); + boundPortCount = BindPorts(); + + printf("\n"); + startup_time = time(NULL); + + if (!Config->nofork) + { + if (DaemonSeed() == ERROR) + { + printf("ERROR: could not go into daemon mode. Shutting down.\n"); + Exit(ERROR); + } + } + + /* Because of limitations in kqueue on freebsd, we must fork BEFORE we + * initialize the socket engine. + */ + SE = new SocketEngine(); + + /* We must load the modules AFTER initializing the socket engine, now */ + LoadAllModules(); + + printf("\nInspIRCd is now running!\n"); + return; } @@ -1550,39 +1582,6 @@ int InspIRCd::Run() sockaddr_in sock_us; // our port number socklen_t uslen; // length of our port number - /* Beta 7 moved all this stuff out of the main function - * into smaller sub-functions, much tidier -- Brain - */ - OpenLog(argv, argc); - Config->ClearStack(); - Config->Read(true,NULL); - CheckRoot(); - SetupCommandTable(); - AddServerName(Config->ServerName); - CheckDie(); - boundPortCount = BindPorts(); - - printf("\n"); - startup_time = time(NULL); - - if (!Config->nofork) - { - if (DaemonSeed() == ERROR) - { - printf("ERROR: could not go into daemon mode. Shutting down.\n"); - Exit(ERROR); - } - } - - /* Because of limitations in kqueue on freebsd, we must fork BEFORE we - * initialize the socket engine. - */ - SE = new SocketEngine(); - - /* We must load the modules AFTER initializing the socket engine, now */ - LoadAllModules(); - - printf("\nInspIRCd is now running!\n"); if (!Config->nofork) { freopen("/dev/null","w",stdout); -- cgit v1.2.3