TittyBiscuits!

git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2429 e03df62e-2008-0410-955e-edbf42e46eb7
This commit is contained in:
brain 2005-12-14 17:53:32 +00:00
parent a467c0fe9e
commit 417432f2be
3 changed files with 32 additions and 35 deletions

View File

@ -20,7 +20,6 @@
#include "inspircd_config.h"
#include "inspircd.h"
#include "base.h"
#include "typedefs.h"
/** A structure that defines a command
*/

View File

@ -42,7 +42,6 @@
#include "inspircd_util.h"
#include "users.h"
#include "channels.h"
#include "typedefs.h"
// some misc defines

View File

@ -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);