]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/inspircd.cpp
Update wiki links to use HTTPS and point to the correct pages.
[user/henk/code/inspircd.git] / src / inspircd.cpp
index 656be220f6c60d37469dd88f793a5b00bcc7daa2..66f9bfdc56ca0de5edba55836444c8031a74c710 100644 (file)
@@ -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);
+       {\r
+               if (exitonfail)\r
+                       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." : ""));\r
+               if (exitonfail)
+                       Exit(EXIT_STATUS_PID);\r
        }
 #endif
 }