X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Finspircd.cpp;h=66f9bfdc56ca0de5edba55836444c8031a74c710;hb=a5d110282a864fd2e91b51ce360a977cd0643657;hp=656be220f6c60d37469dd88f793a5b00bcc7daa2;hpb=aec9540601a8ca8632d0a4e0c4cec1484cfef99a;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/inspircd.cpp b/src/inspircd.cpp index 656be220f..66f9bfdc5 100644 --- a/src/inspircd.cpp +++ b/src/inspircd.cpp @@ -223,6 +223,11 @@ void InspIRCd::RehashUsersAndChans() (**i).already_sent = 0; (**i).RemoveExpiredInvites(); } + + // 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. + ServerInstance->XLines->GetAll("E"); } void InspIRCd::SetSignals() @@ -294,7 +299,7 @@ bool InspIRCd::DaemonSeed() #endif } -void InspIRCd::WritePID(const std::string &filename) +void InspIRCd::WritePID(const std::string& filename, bool exitonfail) { #ifndef _WIN32 std::string fname(filename); @@ -307,10 +312,12 @@ void InspIRCd::WritePID(const std::string &filename) outfile.close(); } else - { - std::cout << "Failed to write PID-file '" << fname << "', exiting." << std::endl; - this->Logs->Log("STARTUP",DEFAULT,"Failed to write PID-file '%s', exiting.",fname.c_str()); - Exit(EXIT_STATUS_PID); + { + if (exitonfail) + std::cout << "Failed to write PID-file '" << fname << "', exiting." << std::endl; + this->Logs->Log("STARTUP",DEFAULT,"Failed to write PID-file '%s'%s",fname.c_str(), (exitonfail ? ", exiting." : "")); + if (exitonfail) + Exit(EXIT_STATUS_PID); } #endif }