X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Finspircd.cpp;h=5f7dfd06fdace1a24c9a9bddeed3e41010e12f8e;hb=1dca8b79edf65c0e5e846cc120f1321fb0a1d15c;hp=a3be309bfb75cd63ff3fb7ba2c3e74174803f812;hpb=0a623f7a93b92171488d2d11902e42308c2e66c3;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/inspircd.cpp b/src/inspircd.cpp index a3be309bf..5f7dfd06f 100644 --- a/src/inspircd.cpp +++ b/src/inspircd.cpp @@ -227,9 +227,9 @@ InspIRCd::InspIRCd(int argc, char** argv) : * themselves within the class. */ GenRandom(&HandleGenRandom), - IsChannel(&HandleIsChannel), - IsNick(&HandleIsNick), - IsIdent(&HandleIsIdent) + IsChannel(&DefaultIsChannel), + IsNick(&DefaultIsNick), + IsIdent(&DefaultIsIdent) { ServerInstance = this; @@ -309,7 +309,7 @@ InspIRCd::InspIRCd(int argc, char** argv) : /* Fall through to handle other weird values too */ std::cout << "Unknown parameter '" << argv[optind-1] << "'" << std::endl; std::cout << "Usage: " << argv[0] << " [--nofork] [--nolog] [--debug] [--config ]" << std::endl << - std::string(static_cast(8+strlen(argv[0])), ' ') << "[--runasroot] [--version]" << std::endl; + std::string(static_cast(8+strlen(argv[0])), ' ') << "[--runasroot] [--version]" << std::endl; Exit(EXIT_STATUS_ARGV); break; } @@ -427,7 +427,7 @@ InspIRCd::InspIRCd(int argc, char** argv) : // Build ISupport as ModuleManager::LoadAll() does not do it this->ISupport.Build(); - Config->ApplyDisabledCommands(Config->DisabledCommands); + Config->ApplyDisabledCommands(); if (!pl.empty()) { @@ -437,7 +437,7 @@ InspIRCd::InspIRCd(int argc, char** argv) : int j = 1; for (FailedPortList::iterator i = pl.begin(); i != pl.end(); i++, j++) { - std::cout << j << ".\tAddress: " << (i->first.empty() ? "" : i->first) << " \tReason: " << i->second << std::endl; + std::cout << j << ".\tAddress: " << i->first.str() << " \tReason: " << strerror(i->second) << std::endl; } std::cout << std::endl << "Hint: Try using a public IP instead of blank or *" << std::endl; @@ -498,7 +498,7 @@ InspIRCd::InspIRCd(int argc, char** argv) : QueryPerformanceFrequency(&stats.QPFrequency); #endif - Logs->Log("STARTUP", LOG_DEFAULT, "Startup complete as '%s'[%s], %d max open sockets", Config->ServerName.c_str(),Config->GetSID().c_str(), SocketEngine::GetMaxFds()); + Logs->Log("STARTUP", LOG_DEFAULT, "Startup complete as '%s'[%s], %lu max open sockets", Config->ServerName.c_str(),Config->GetSID().c_str(), SocketEngine::GetMaxFds()); #ifndef _WIN32 ConfigTag* security = Config->ConfValue("security"); @@ -642,8 +642,15 @@ void InspIRCd::Run() OLDTIME = TIME.tv_sec; if ((TIME.tv_sec % 3600) == 0) + { FOREACH_MOD(OnGarbageCollect, ()); + // HACK: ELines are not expired properly at the moment but it can't be fixed as + // the 2.0 XLine system is a spaghetti nightmare. Instead we skip over expired + // ELines in XLineManager::CheckELines() and expire them here instead. + XLines->GetAll("E"); + } + Timers.TickTimers(TIME.tv_sec); Users->DoBackgroundUserStuff();