X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Finspircd.cpp;h=cad322e3433dbb2859615cf04ec39583aa43c62b;hb=393cc8f9d65aefd92628115edae341562ea440e7;hp=cb428c32a42afae8f4627452859e6e8d6efbd05f;hpb=5b1ee304b5e1d71c71eec9ebf8f40758dfce5c1e;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/inspircd.cpp b/src/inspircd.cpp index cb428c32a..cad322e34 100644 --- a/src/inspircd.cpp +++ b/src/inspircd.cpp @@ -52,11 +52,7 @@ #include #include #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();