#include "caller.h"
#include "testsuite.h"
-InspIRCd* SI = NULL;
+InspIRCd* ServerInstance = NULL;
int* mysig = NULL;
/** Seperate from the other casemap tables so that code *can* still exclusively rely on RFC casemapping
this->Modules->Unload(k->c_str());
}
}
- /* Remove core commands */
- Parser->RemoveRFCCommands();
/* Cleanup Server Names */
for(servernamelist::iterator itr = servernames.begin(); itr != servernames.end(); ++itr)
}
}
-InspIRCd::InspIRCd(int argc, char** argv)
- : GlobalCulls(this),
-
+InspIRCd::InspIRCd(int argc, char** argv) :
/* Functor initialisation. Note that the ordering here is very important.
*
* THIS MUST MATCH ORDER OF DECLARATION OF THE HandleWhateverFunc classes
// Avoid erroneous frees on early exit
WindowsIPC = 0;
#endif
+
+ ServerInstance = this;
+
+ Extensible::Register(&User::NICKForced);
+ Extensible::Register(&User::OperQuit);
+
FailedPortList pl;
int do_version = 0, do_nofork = 0, do_debug = 0,
do_nolog = 0, do_root = 0, do_testsuite = 0; /* flag variables */
this->Config = new ServerConfig(this);
this->SNO = new SnomaskManager(this);
this->BanCache = new BanCacheManager(this);
- this->Modules = new ModuleManager(this);
+ this->Modules = new ModuleManager();
this->stats = new serverstats();
this->Timers = new TimerManager(this);
this->Parser = new CommandParser(this);
this->Config->Apply(NULL, "");
Logs->OpenFileLogs();
- /** Note: This is safe, the method checks for user == NULL */
- this->Parser->SetupCommandTable();
-
this->Res = new DNS(this);
this->AddServerName(Config->ServerName);
*/
ENTRYPOINT
{
- SI = new InspIRCd(argc, argv);
- mysig = &SI->s_signal;
- SI->Run();
- delete SI;
+ new InspIRCd(argc, argv);
+ mysig = &ServerInstance->s_signal;
+ ServerInstance->Run();
+ delete ServerInstance;
return 0;
}