*/
/* $Core */
-/* $Install: src/inspircd $(BINPATH) */
#include "inspircd.h"
+#include "inspircd_version.h"
#include <signal.h>
#ifndef WIN32
"CreateEvent failed" /* 19 */
};
-template<typename T> static void DeleteZero(T* n)
+template<typename T> static void DeleteZero(T*&n)
{
if (n != NULL)
{
this->Modules->Unload(k->c_str());
}
}
- /* Remove core commands */
- Parser->RemoveCommands("<core>");
/* Cleanup Server Names */
for(servernamelist::iterator itr = servernames.begin(); itr != servernames.end(); ++itr)
/* Delete objects dynamically allocated in constructor (destructor would be more appropriate, but we're likely exiting) */
/* Must be deleted before modes as it decrements modelines */
+ DeleteZero(this->FakeClient);
DeleteZero(this->Users);
DeleteZero(this->Modes);
DeleteZero(this->XLines);
DeleteZero(this->PI);
DeleteZero(this->Threads);
DeleteZero(this->Timers);
+ DeleteZero(this->SE);
/* Close logging */
this->Logs->CloseLogs();
DeleteZero(this->Logs);
}
}
-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
// 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);
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);
*/
bool InspIRCd::AllModulesReportReady(User* user)
{
- for (EventHandlerIter i = Modules->EventHandlers[I_OnCheckReady].begin(); i != Modules->EventHandlers[I_OnCheckReady].end(); ++i)
- {
- if (!(*i)->OnCheckReady(user))
- return false;
- }
- return true;
+ ModResult res;
+ FIRST_MOD_RESULT(this, OnCheckReady, res, (user));
+ return (res == MOD_RES_PASSTHRU);
}
time_t InspIRCd::Time()