From 27c066998bea20387d4c33e504145496aad1b344 Mon Sep 17 00:00:00 2001 From: David Vazgenovich Shakaryan Date: Mon, 21 Apr 2014 06:31:59 -0700 Subject: Add debug setting for verbose output. --- core/config.rb | 2 ++ dinobot.rb | 2 +- module/admin.rb | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/core/config.rb b/core/config.rb index fec2e18..242f030 100644 --- a/core/config.rb +++ b/core/config.rb @@ -15,6 +15,8 @@ module Dinobot if @data.nil? @data = Hash.new + @data[:debug] = false + @data[:trigger] = Hash.new @data[:trigger][:global] = '!' diff --git a/dinobot.rb b/dinobot.rb index 9b33894..43b21c8 100644 --- a/dinobot.rb +++ b/dinobot.rb @@ -153,7 +153,7 @@ module Dinobot def run_methods(methods) methods.each do |m| - @logger.info "Executing method: #{m.inspect}" + @logger.info "Executing method: #{m.inspect}" if @config.data[:debug] send(*m) end end diff --git a/module/admin.rb b/module/admin.rb index 768d4f6..1a081df 100644 --- a/module/admin.rb +++ b/module/admin.rb @@ -76,7 +76,7 @@ module Dinobot def listadmins(user, channel, argument) return unless is_admin?(user) - [[:say, channel, @admins.join(' ')]] + [[:say, channel, "Admins: #{@admins.join(' ')}"]] end def listmodules(user, channel, argument) -- cgit v1.2.3-70-g09d2