]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/inspircd.cpp
Remove now needless User::ForceNickChange()
[user/henk/code/inspircd.git] / src / inspircd.cpp
index cb428c32a42afae8f4627452859e6e8d6efbd05f..cad322e3433dbb2859615cf04ec39583aa43c62b 100644 (file)
 #include <fstream>
 #include <iostream>
 #include "xline.h"
-#include "socketengine.h"
-#include "socket.h"
-#include "command_parse.h"
 #include "exitcodes.h"
-#include "caller.h"
 #include "testsuite.h"
 
 InspIRCd* ServerInstance = NULL;
@@ -128,16 +124,10 @@ void InspIRCd::Cleanup()
                FakeClient->cull();
        }
        DeleteZero(this->FakeClient);
-       DeleteZero(this->Users);
-       DeleteZero(this->Modes);
        DeleteZero(this->XLines);
-       DeleteZero(this->Modules);
-       DeleteZero(this->SNO);
        DeleteZero(this->Config);
-       DeleteZero(this->PI);
        SocketEngine::Deinit();
        Logs->CloseLogs();
-       DeleteZero(this->Logs);
 }
 
 void InspIRCd::SetSignals()
@@ -232,6 +222,7 @@ void InspIRCd::WritePID(const std::string &filename)
 
 InspIRCd::InspIRCd(int argc, char** argv) :
         ConfigFileName(INSPIRCD_CONFIG_PATH "/inspircd.conf"),
+        PI(&DefaultProtocolInterface),
 
         /* Functor pointer initialisation.
          *
@@ -255,34 +246,17 @@ InspIRCd::InspIRCd(int argc, char** argv) :
            do_nolog = 0, do_root = 0;
 
        // Initialize so that if we exit before proper initialization they're not deleted
-       this->Logs = 0;
-       this->PI = 0;
-       this->Users = 0;
        this->Config = 0;
-       this->SNO = 0;
-       this->Modules = 0;
        this->XLines = 0;
-       this->Modes = 0;
        this->ConfigThread = NULL;
        this->FakeClient = NULL;
 
        UpdateTime();
        this->startup_time = TIME.tv_sec;
 
-       // This must be created first, so other parts of Insp can use it while starting up
-       this->Logs = new LogManager;
-
        SocketEngine::Init();
 
-       /* Default implementation does nothing */
-       this->PI = new ProtocolInterface;
-
-       // Create base manager classes early, so nothing breaks
-       this->Users = new UserManager;
-
        this->Config = new ServerConfig;
-       this->SNO = new SnomaskManager;
-       this->Modules = new ModuleManager();
        dynamic_reference_base::reset_all();
        this->XLines = new XLineManager;
 
@@ -405,8 +379,6 @@ InspIRCd::InspIRCd(int argc, char** argv) :
        std::cout << "\tAttila" << con_reset << std::endl << std::endl;
        std::cout << "Others:\t\t\t" << con_green << "See /INFO Output" << con_reset << std::endl;
 
-       this->Modes = new ModeParser;
-
 #ifndef _WIN32
        if (!do_root)
                this->CheckRoot();