- this->Modes = 0;
- this->Res = 0;
-
- // Initialise TIME
- this->TIME = time(NULL);
-
- memset(&server, 0, sizeof(server));
- memset(&client, 0, sizeof(client));
-
- // This must be created first, so other parts of Insp can use it while starting up
- this->Logs = new LogManager(this);
-
- SocketEngineFactory* SEF = new SocketEngineFactory();
- SE = SEF->Create(this);
- delete SEF;
-
- ThreadEngineFactory* tef = new ThreadEngineFactory();
- this->Threads = tef->Create(this);
- delete tef;
- this->Mutexes = new MutexFactory(this);
-
- /* Default implementation does nothing */
- this->PI = new ProtocolInterface(this);
-
- this->s_signal = 0;
-
- // Create base manager classes early, so nothing breaks
- this->Users = new UserManager(this);
-
- this->Users->unregistered_count = 0;
-
- this->Users->clientlist = new user_hash();
- this->Users->uuidlist = new user_hash();
- this->chanlist = new chan_hash();
-
- this->Config = new ServerConfig(this);
- this->SNO = new SnomaskManager(this);
- this->BanCache = new BanCacheManager(this);
- this->Modules = new ModuleManager(this);
- this->stats = new serverstats();
- this->Timers = new TimerManager(this);
- this->Parser = new CommandParser(this);
- this->XLines = new XLineManager(this);
-
- this->Config->argv = argv;
- this->Config->argc = argc;
-
- if (chdir(Config->GetFullProgDir().c_str()))
- {
- printf("Unable to change to my directory: %s\nAborted.", strerror(errno));
- exit(0);
- }