]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/logger.cpp
Merge pull request #1157 from SaberUK/insp20+fix-cron-restart
[user/henk/code/inspircd.git] / src / logger.cpp
index 41363b4142154b7489ac3ff144f04d9b3f9f1e05..89b2be019721289c241b4839bb591820215b1b84 100644 (file)
@@ -1,16 +1,25 @@
-/*       +------------------------------------+
- *       | Inspire Internet Relay Chat Daemon |
- *       +------------------------------------+
+/*
+ * InspIRCd -- Internet Relay Chat Daemon
+ *
+ *   Copyright (C) 2009 Daniel De Graaf <danieldg@inspircd.org>
+ *   Copyright (C) 2008 Craig Edwards <craigedwards@brainbox.cc>
+ *   Copyright (C) 2008 Thomas Stagner <aquanight@inspircd.org>
+ *   Copyright (C) 2008 Robin Burchell <robin+git@viroteck.net>
  *
- *  InspIRCd: (C) 2002-2010 InspIRCd Development Team
- * See: http://wiki.inspircd.org/Credits
+ * This file is part of InspIRCd.  InspIRCd is free software: you can
+ * redistribute it and/or modify it under the terms of the GNU General Public
+ * License as published by the Free Software Foundation, version 2.
  *
- * This program is free but copyrighted software; see
- *            the file COPYING for details.
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
+ * details.
  *
- * ---------------------------------------------------
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+
 #include "inspircd.h"
 
 #include "filelogger.h"
@@ -53,7 +62,7 @@ LogManager::~LogManager()
 
 void LogManager::OpenFileLogs()
 {
-       if (Config->cmdline.forcedebug)
+       if (ServerInstance->Config->cmdline.forcedebug)
        {
                ServerInstance->Config->RawLog = true;
                return;
@@ -124,7 +133,7 @@ void LogManager::OpenFileLogs()
 
 void LogManager::CloseLogs()
 {
-       if (Config->cmdline.forcedebug)
+       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 */