X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=bin%2Frbot;h=8c65f42cadaa63f7ec7718392232181762f46e38;hb=98446561cf3c7126dd93b34c9be361fa4aa8da36;hp=82ee9c9a4b9f28958369ad9c5dc78d662027e91a;hpb=0368e8c09385a6c49e0d59cd6162675057e5b339;p=user%2Fhenk%2Fcode%2Fruby%2Frbot.git diff --git a/bin/rbot b/bin/rbot index 82ee9c9a..8c65f42c 100755 --- a/bin/rbot +++ b/bin/rbot @@ -111,14 +111,14 @@ if ($opts["help"]) exit 0 end -if(bot = Irc::Bot.new(ARGV.shift, :argv => orig_opts)) - # setup logger based on command line arguments - loglevel = $opts['loglevel'] ? $opts['loglevel'].to_i : nil - loglevel = $opts['debug'] ? 0 : loglevel - if loglevel - Irc::Bot::LoggerManager.instance.set_level(loglevel) - end +# setup logger based on command line arguments +loglevel = $opts['loglevel'] ? $opts['loglevel'].to_i : nil +loglevel = $opts['debug'] ? 0 : loglevel +if loglevel + Irc::Bot::LoggerManager.instance.set_level(loglevel) +end +if(bot = Irc::Bot.new(ARGV.shift, :argv => orig_opts)) # just run the bot bot.mainloop end