X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Finspircd.cpp;h=d533a6e450b035157bdb5d81f6a0adbfbf96029f;hb=e5131f92b3b88ae7646da9a9972b1bbb5855f874;hp=5f50e900cd3cb297136835607740003f6c263215;hpb=e48c7e038abe2954ecec30f465c811f017793332;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/inspircd.cpp b/src/inspircd.cpp index 5f50e900c..d533a6e45 100644 --- a/src/inspircd.cpp +++ b/src/inspircd.cpp @@ -12,8 +12,6 @@ */ /* $Install: src/inspircd $(BINPATH) */ - - #include "inspircd.h" #include @@ -28,6 +26,13 @@ #ifndef RUSAGE_SELF #define RUSAGE_SELF 0 #endif + + /* CRT memory debugging */ + #ifdef DEBUG + #define _CRTDBG_MAP_ALLOC + #include + #include + #endif #endif #include @@ -277,22 +282,38 @@ void InspIRCd::WritePID(const std::string &filename) InspIRCd::InspIRCd(int argc, char** argv) : GlobalCulls(this), - /* Functor initialisation. Note that the ordering here is very important. */ + /* Functor initialisation. Note that the ordering here is very important. + * + * THIS MUST MATCH ORDER OF DECLARATION OF THE HandleWhateverFunc classes + * within class InspIRCd. + */ HandleProcessUser(this), HandleIsNick(this), HandleIsIdent(this), HandleFindDescriptor(this), HandleFloodQuitUser(this), - - /* Functor pointer initialisation. Must match the order of the list above */ + HandleIsChannel(this), + HandleIsSID(this), + HandleRehash(this), + + /* Functor pointer initialisation. Must match the order of the list above + * + * THIS MUST MATCH THE ORDER OF DECLARATION OF THE FUNCTORS, e.g. the methods + * themselves within the class. + */ ProcessUser(&HandleProcessUser), + IsChannel(&HandleIsChannel), + IsSID(&HandleIsSID), + Rehash(&HandleRehash), IsNick(&HandleIsNick), IsIdent(&HandleIsIdent), FindDescriptor(&HandleFindDescriptor), FloodQuitUser(&HandleFloodQuitUser) { - +#ifdef WIN32 + _CrtSetDbgFlag ( _CRTDBG_CHECK_ALWAYS_DF | _CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF ); +#endif int found_ports = 0; FailedPortList pl; int do_version = 0, do_nofork = 0, do_debug = 0, @@ -541,6 +562,7 @@ InspIRCd::InspIRCd(int argc, char** argv) { printf("\nWARNING: Not all your client ports could be bound --\nstarting anyway with %d of %d client ports bound.\n\n", bounditems, found_ports); printf("The following port(s) failed to bind:\n"); + printf("Hint: Try using an IP instead of blank or *\n\n"); int j = 1; for (FailedPortList::iterator i = pl.begin(); i != pl.end(); i++, j++) {