diff options
author | Matthias Hecker <mail@apoc.cc> | 2020-04-12 01:39:08 +0200 |
---|---|---|
committer | Matthias Hecker <mail@apoc.cc> | 2020-04-12 01:39:08 +0200 |
commit | 69a5e6173695fa9fb1cf6dd81212ef6a68c52be8 (patch) | |
tree | 31a8c2d3405b94bdb32dbaf1822e8e34bb4125ac /data/rbot | |
parent | ac8529c8370bd6dbcb0947bc14e1cc2117826a29 (diff) |
plugin(points): disregard self after stripping color codes
Diffstat (limited to 'data/rbot')
-rw-r--r-- | data/rbot/plugins/points.rb | 1 |
1 files changed, 1 insertions, 0 deletions
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!" |