diff options
author | Adam <Adam@anope.org> | 2010-08-17 19:27:37 -0400 |
---|---|---|
committer | Adam <Adam@anope.org> | 2010-08-17 19:27:37 -0400 |
commit | e65d8b2f3dfdb40858259b3bb48ef6998c31e62f (patch) | |
tree | fd845bdef5664d025ab19c262ae2c5e9d23d7bb2 /src/log.cpp | |
parent | 2575008baa5c9d0ca789680da1a3b81dc74786f7 (diff) |
Rewrote the config reader to better handle invalid configs.
This prevents Anope from exploding when /os reload has errors.
Diffstat (limited to 'src/log.cpp')
-rw-r--r-- | src/log.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/log.cpp b/src/log.cpp index 9f5e05ebc..62fa29600 100644 --- a/src/log.cpp +++ b/src/log.cpp @@ -45,11 +45,11 @@ static void remove_log() Anope::string name; - if (!Config.KeepLogs) + if (!Config->KeepLogs) return; time(&t); - t -= (60 * 60 * 24 * Config.KeepLogs); + t -= (60 * 60 * 24 * Config->KeepLogs); tm = *localtime(&t); /* removed if from here cause get_logchan is always 1 */ @@ -258,7 +258,7 @@ Alog::~Alog() std::cout << tbuf << " " << buf.str() << std::endl; else if (Level == LOG_TERMINAL) // XXX dont use this yet unless you know we're at terminal and not daemonized std::cout << buf.str() << std::endl; - if (!Config.LogChannel.empty() && LogChan && !debug && findchan(Config.LogChannel)) - ircdproto->SendPrivmsg(Global, Config.LogChannel, "%s", buf.str().c_str()); + if (Config && !Config->LogChannel.empty() && LogChan && !debug && findchan(Config->LogChannel)) + ircdproto->SendPrivmsg(Global, Config->LogChannel, "%s", buf.str().c_str()); errno = errno_save; } |