diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2005-12-14 17:53:32 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2005-12-14 17:53:32 +0000 |
commit | 417432f2be811573326b8366783020fa1fd63eec (patch) | |
tree | a0ae048e7255275880ea24c53de66f1f62fd54a8 /src/inspircd.cpp | |
parent | a467c0fe9e901e65109b036a4beb0667f74dadd8 (diff) |
TittyBiscuits!
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2429 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/inspircd.cpp')
-rw-r--r-- | src/inspircd.cpp | 65 |
1 files changed, 32 insertions, 33 deletions
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); |