From 69a5e6173695fa9fb1cf6dd81212ef6a68c52be8 Mon Sep 17 00:00:00 2001 From: Matthias Hecker Date: Sun, 12 Apr 2020 01:39:08 +0200 Subject: plugin(points): disregard self after stripping color codes --- data/rbot/plugins/points.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/data/rbot/plugins/points.rb b/data/rbot/plugins/points.rb index 0209fabe..34af9b50 100644 --- a/data/rbot/plugins/points.rb +++ b/data/rbot/plugins/points.rb @@ -112,6 +112,7 @@ class PointsPlugin < Plugin next if v == 0 or /--|\+\+/.match(k) # strip invisible formatting characters like bold or color codes k = k.gsub(FormattingRx, '') + next if k.downcase == m.sourcenick.downcase @registry[k] += (v > 0 ? 1 : -1) m.reply @bot.lang.get("thanks") if k == @bot.nick && v > 0 m.reply "#{k} now has #{@registry[k]} points!" -- cgit v1.2.3