diff options
author | David Vazgenovich Shakaryan <dvshakaryan@gmail.com> | 2014-04-21 06:31:59 -0700 |
---|---|---|
committer | David Vazgenovich Shakaryan <dvshakaryan@gmail.com> | 2014-04-21 06:31:59 -0700 |
commit | 27c066998bea20387d4c33e504145496aad1b344 (patch) | |
tree | 70e1a352476c2f9d6996b373f3f5e8275e4b0ee8 | |
parent | 607d7ae62d59bbc422da2211286fca96caa4f5e7 (diff) | |
download | dinobot-27c066998bea20387d4c33e504145496aad1b344.tar.gz dinobot-27c066998bea20387d4c33e504145496aad1b344.tar.xz |
Add debug setting for verbose output.
-rw-r--r-- | core/config.rb | 2 | ||||
-rw-r--r-- | dinobot.rb | 2 | ||||
-rw-r--r-- | 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] = '!' @@ -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) |