X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Finspircd.cpp;h=cad322e3433dbb2859615cf04ec39583aa43c62b;hb=acccaa39641500b8a691db4136e6571102a438ed;hp=c878138fe4154475f4cfaf0591439a12aa486cce;hpb=caa0c27a5a485151a0de21e700680c1e46ab85b4;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/inspircd.cpp b/src/inspircd.cpp index c878138fe..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,18 +124,10 @@ void InspIRCd::Cleanup() FakeClient->cull(); } DeleteZero(this->FakeClient); - DeleteZero(this->Users); - DeleteZero(this->Modes); DeleteZero(this->XLines); - DeleteZero(this->Parser); - DeleteZero(this->Modules); - DeleteZero(this->BanCache); - DeleteZero(this->SNO); DeleteZero(this->Config); - DeleteZero(this->PI); SocketEngine::Deinit(); Logs->CloseLogs(); - DeleteZero(this->Logs); } void InspIRCd::SetSignals() @@ -234,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. * @@ -257,39 +246,18 @@ 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->BanCache = 0; - this->Modules = 0; - this->Parser = 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->BanCache = new BanCacheManager; - this->Modules = new ModuleManager(); dynamic_reference_base::reset_all(); - this->Parser = new CommandParser; this->XLines = new XLineManager; this->Config->cmdline.argv = argv; @@ -411,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();