From 2ea2d5814982a9b54e224ca2414b4fdb0ba0c5cc Mon Sep 17 00:00:00 2001 From: Dmitry Kim Date: Fri, 23 Nov 2007 12:50:14 +0000 Subject: * (plugins/karma) don't thank for bot karma decrements --- data/rbot/plugins/karma.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/data/rbot/plugins/karma.rb b/data/rbot/plugins/karma.rb index eecfbe26..60b1dcf8 100644 --- a/data/rbot/plugins/karma.rb +++ b/data/rbot/plugins/karma.rb @@ -71,7 +71,7 @@ class KarmaPlugin < Plugin if (tok =~ /^(?:--)(.*[^-].*)$/) || (tok =~ /^(.*[^-].*)(?:--)$/) op, arg = '--', $1 next - elsif (tok =~ /^(?:\+\+)(.*[^+].*)$/) || (tok =~ /^(.*[^+].*)(?:\+\+)$/) + elsif (tok =~ /^(?:\+\+)(.*[^+].*)$/)||(tok =~ /^(.*[^+].*)(?:\+\+)$/) op, arg = '++', $1 next end @@ -94,7 +94,7 @@ class KarmaPlugin < Plugin ac.each do |k, v| next if v == 0 @registry[k] += (v > 0 ? 1 : -1) - m.reply @bot.lang.get("thanks") if k == @bot.nick + m.reply @bot.lang.get("thanks") if k == @bot.nick && v > 0 end end end -- cgit v1.2.3