]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/logger.cpp
Fix the pseudo-penalty hack that doesn't work properly
[user/henk/code/inspircd.git] / src / logger.cpp
index 2e3f556c6c7ddb4eded7afef28739e51326453d3..2e26823683ea0521df6a00c72a7ff29423cc4b16 100644 (file)
@@ -53,6 +53,11 @@ LogManager::~LogManager()
 
 void LogManager::OpenFileLogs()
 {
+       if (ServerInstance->Config->cmdline.forcedebug)
+       {
+               ServerInstance->Config->RawLog = true;
+               return;
+       }
        /* Skip rest of logfile opening if we are running -nolog. */
        if (!ServerInstance->Config->cmdline.writelog)
                return;
@@ -119,6 +124,8 @@ void LogManager::OpenFileLogs()
 
 void LogManager::CloseLogs()
 {
+       if (ServerInstance->Config && ServerInstance->Config->cmdline.forcedebug)
+               return;
        std::map<std::string, std::vector<LogStream*> >().swap(LogStreams); /* Clear it */
        std::map<LogStream*, std::vector<std::string> >().swap(GlobalLogStreams); /* Clear it */
        for (std::map<LogStream*, int>::iterator i = AllLogStreams.begin(); i != AllLogStreams.end(); ++i)