From 291d1dc8cbb398e3e62cbf92688e21561a0019f5 Mon Sep 17 00:00:00 2001 From: Dmitry Kim Date: Tue, 21 Aug 2007 06:15:48 +0000 Subject: * (ircbot) remove $cl_loglevel undefined warning --- lib/rbot/ircbot.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/rbot') diff --git a/lib/rbot/ircbot.rb b/lib/rbot/ircbot.rb index bb9c530d..c8b0d46f 100644 --- a/lib/rbot/ircbot.rb +++ b/lib/rbot/ircbot.rb @@ -10,7 +10,7 @@ $daemonize = false unless $daemonize $dateformat = "%Y/%m/%d %H:%M:%S" $logger = Logger.new($stderr) $logger.datetime_format = $dateformat -$logger.level = $cl_loglevel if $cl_loglevel +$logger.level = $cl_loglevel if defined? $cl_loglevel $logger.level = 0 if $debug require 'pp' @@ -426,7 +426,7 @@ class Bot $logger = Logger.new(@logfile, @config['log.keep'], @config['log.max_size']*1024*1024) $logger.datetime_format= $dateformat $logger.level = @config['log.level'] - $logger.level = $cl_loglevel if $cl_loglevel + $logger.level = $cl_loglevel if defined? $cl_loglevel $logger.level = 0 if $debug log_session_start -- cgit v1.2.3