summaryrefslogtreecommitdiff
path: root/data/rbot
diff options
context:
space:
mode:
Diffstat (limited to 'data/rbot')
-rw-r--r--data/rbot/plugins/points.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/data/rbot/plugins/points.rb b/data/rbot/plugins/points.rb
index 58f24501..0209fabe 100644
--- a/data/rbot/plugins/points.rb
+++ b/data/rbot/plugins/points.rb
@@ -109,7 +109,9 @@ class PointsPlugin < Plugin
end
ac.each do |k, v|
- next if v == 0
+ next if v == 0 or /--|\+\+/.match(k)
+ # strip invisible formatting characters like bold or color codes
+ k = k.gsub(FormattingRx, '')
@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!"